~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to lib/GenTest.pm

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
package GenTest;
19
19
use base 'Exporter';
20
20
 
21
 
@EXPORT = ('say', 'sayFile', 'tmpdir', 'safe_exit', 'osWindows', 'osLinux',
22
 
           'osSolaris', 'isoTimestamp', 'isoUTCTimestamp', 'rqg_debug');
 
21
@EXPORT = ('say', 'sayFile', 'tmpdir', 'safe_exit', 
 
22
           'osWindows', 'osLinux', 'osSolaris', 'osMac',
 
23
           'isoTimestamp', 'isoUTCTimestamp', 'rqg_debug', 'unix2winPath');
23
24
 
24
25
use strict;
25
26
 
141
142
        }       
142
143
}
143
144
 
 
145
sub osMac {
 
146
    if ($^O eq 'darwin') {
 
147
        return 1;
 
148
    } else {
 
149
        return 0;
 
150
    }
 
151
}
 
152
 
144
153
sub isoTimestamp {
145
154
        my $datetime = shift;
146
155
 
157
166
        
158
167
}
159
168
 
 
169
# unix2winPath:
 
170
#   Converts the given file path from unix style to windows native style
 
171
#   by replacing all forward slashes to backslashes.
 
172
sub unix2winPath {
 
173
    my $path = shift;
 
174
    $path =~ s/\//\\/g; # replace "/" with "\"
 
175
    return $path;
 
176
}
 
177
 
160
178
sub rqg_debug {
161
179
        if ($ENV{RQG_DEBUG}) {
162
180
                return 1;