Skip to content

Commit 31151e5

Browse files
fredrikekreKristofferC
authored andcommitted
Update readlines(::Cmd) test to not rely on the filesystem (#58607)
(cherry picked from commit 48c0e7f)
1 parent 6ab22e4 commit 31151e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/spawn.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ end
620620
@test reduce(&, [`$echocmd abc`, `$echocmd def`, `$echocmd hij`]) == `$echocmd abc` & `$echocmd def` & `$echocmd hij`
621621

622622
# readlines(::Cmd), accidentally broken in #20203
623-
@test sort(readlines(`$lscmd -A`)) == sort(readdir())
623+
let str = "foo\nbar"
624+
@test readlines(`$echocmd $str`) == split(str)
625+
end
624626

625627
# issue #19864 (PR #20497)
626628
let c19864 = readchomp(pipeline(ignorestatus(

0 commit comments

Comments
 (0)