Skip to content

Commit 3d702bc

Browse files
authored
Make file test robust for other OS languages (#45241)
1 parent 59d1d54 commit 3d702bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/file.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,8 @@ close(s)
604604
false
605605
catch e
606606
isa(e, SystemError) || rethrow()
607-
@test sprint(showerror, e) == "SystemError: opening file \"this file is not expected to exist\": No such file or directory"
607+
@test e.errnum == 2
608+
@test startswith(sprint(showerror, e), "SystemError: opening file \"this file is not expected to exist\"")
608609
true
609610
end
610611
end

0 commit comments

Comments
 (0)