@@ -7,19 +7,19 @@ if VERSION < v"0.4.0-dev"
7
7
end
8
8
9
9
context (" OS" ) do
10
- @linux_only begin
10
+ if is_linux ()
11
11
@fact FileIO. applies_to_os (FileIO. Linux) --> true
12
12
@fact FileIO. applies_to_os (FileIO. OSX) --> false
13
13
@fact FileIO. applies_to_os (FileIO. Unix) --> true
14
14
@fact FileIO. applies_to_os (FileIO. Windows) --> false
15
15
end
16
- @osx_only begin
16
+ if is_apple ()
17
17
@fact FileIO. applies_to_os (FileIO. Linux) --> false
18
18
@fact FileIO. applies_to_os (FileIO. OSX) --> true
19
19
@fact FileIO. applies_to_os (FileIO. Unix) --> true
20
20
@fact FileIO. applies_to_os (FileIO. Windows) --> false
21
21
end
22
- @windows_only begin
22
+ if is_windows ()
23
23
@fact FileIO. applies_to_os (FileIO. Linux) --> false
24
24
@fact FileIO. applies_to_os (FileIO. OSX) --> false
25
25
@fact FileIO. applies_to_os (FileIO. Unix) --> false
@@ -227,14 +227,16 @@ try
227
227
context (" multiple libs" ) do
228
228
lensave0 = length (FileIO. sym2saver)
229
229
lenload0 = length (FileIO. sym2loader)
230
- OSKey = @osx ? FileIO. OSX : @windows ? FileIO. Windows : @linux ? FileIO. Linux : error (" os not supported" )
230
+ OSKey = is_apple () ? FileIO. OSX : is_windows () ? FileIO. Windows : is_linux () ? FileIO. Linux : error (" os not supported" )
231
231
add_format (
232
232
format " MultiLib" ,
233
233
UInt8[0x42 ,0x4d ],
234
234
" .mlb" ,
235
235
[:LoadTest1 , FileIO. LOAD, OSKey],
236
236
[:LoadTest2 ]
237
237
)
238
+ stderr_copy = STDERR
239
+ rd,wr = redirect_stderr ()
238
240
@fact lensave0 + 1 --> length (FileIO. sym2saver)
239
241
@fact lenload0 + 1 --> length (FileIO. sym2loader)
240
242
@fact length (FileIO. sym2loader[:MultiLib ]) --> 2
250
252
@fact isdefined (:LoadTest1 ) --> true # first module should load first but fail
251
253
@fact x --> 42
252
254
rm (fn)
255
+ close (rd);close (wr)
256
+ redirect_stderr (stderr_copy)
253
257
end
254
258
finally
255
259
# Restore the registry
0 commit comments