Skip to content

Commit fd671b3

Browse files
committed
[REPL] Do not require test to run within /tmp
1 parent 7a6f423 commit fd671b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

stdlib/REPL/test/replcompletions.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,14 @@ let s, c, r
663663
@test s[r] == "tmp"
664664

665665
# This should match things that are inside the tmp directory
666-
if !isdir("/tmp/tmp")
667-
s = "/tmp/"
666+
s = tempdir()
667+
if !endswith(s, "/")
668+
s = string(s, "/")
669+
end
670+
if !isdir(joinpath(s, "tmp"))
668671
c,r = test_scomplete(s)
669672
@test !("tmp/" in c)
670-
@test r === 6:5
673+
@test r === length(s) + 1:0
671674
@test s[r] == ""
672675
end
673676

0 commit comments

Comments
 (0)