@@ -138,11 +138,11 @@ let x = rand(rng, Int64, 3,4)
138138 @test x == rand (rng, Int64, (3 ,4 ))
139139end
140140
141- extrapath = is_windows () ? joinpath (JULIA_HOME," .." ," Git" ," usr" ," bin" )* " ;" : " "
141+ extrapath = Compat . Sys . iswindows () ? joinpath (JULIA_HOME," .." ," Git" ," usr" ," bin" )* " ;" : " "
142142@compat withenv (" PATH" => extrapath * ENV [" PATH" ]) do
143143 cmd1 = pipeline (` echo hello` , ` sort` )
144144 cmd2 = pipeline (` true` , ` true` )
145- if is_windows ()
145+ if Compat . Sys . iswindows ()
146146 try # use busybox-w32
147147 success (` busybox` )
148148 cmd1 = pipeline (` busybox echo hello` , ` busybox sort` )
@@ -921,7 +921,7 @@ cd(dirwalk) do
921921 touch (joinpath (" sub_dir1" , " file$i " ))
922922 end
923923 touch (joinpath (" sub_dir2" , " file_dir2" ))
924- has_symlinks = is_unix () ? true : (isdefined (Base, :WINDOWS_VISTA_VER ) && Base. windows_version () >= Base. WINDOWS_VISTA_VER)
924+ has_symlinks = Compat . Sys . isunix () ? true : (isdefined (Base, :WINDOWS_VISTA_VER ) && Base. windows_version () >= Base. WINDOWS_VISTA_VER)
925925 follow_symlink_vec = has_symlinks ? [true , false ] : [false ]
926926 has_symlinks && symlink (abspath (" sub_dir2" ), joinpath (" sub_dir1" , " link" ))
927927 for follow_symlinks in follow_symlink_vec
@@ -1228,6 +1228,15 @@ end
12281228@test Compat. repeat (1 : 2 , outer= [2 ]) == [1 , 2 , 1 , 2 ]
12291229@test Compat. repeat ([1 ,2 ], inner= (2 ,)) == [1 , 1 , 2 , 2 ]
12301230
1231+ for os in [:apple , :bsd , :linux , :unix , :windows ]
1232+ from_base = if VERSION >= v " 0.7.0-DEV.914"
1233+ Expr (:., Expr (:., :Base , Base. Meta. quot (:Sys )), Base. Meta. quot (Symbol (" is" , os)))
1234+ else # VERSION >= v"0.5.0-dev+4267"
1235+ Expr (:., :Base , Base. Meta. quot (Symbol (" is_" , os)))
1236+ end
1237+ @eval @test Compat. Sys.$ (Symbol (" is" , os))() == $ from_base ()
1238+ end
1239+
12311240io = IOBuffer ()
12321241@test @compat (get (io, :limit , false )) == false
12331242@test @compat (get (io, :compact , false )) == false
0 commit comments