Skip to content

Commit 75aebb6

Browse files
fredrikekreKristoffer Carlsson
authored andcommitted
Update readlines(::Cmd) test to not rely on the filesystem (#58607)
(cherry picked from commit 48c0e7f)
1 parent 9c02bf3 commit 75aebb6

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
@@ -609,7 +609,9 @@ end
609609
@test reduce(&, [`$echocmd abc`, `$echocmd def`, `$echocmd hij`]) == `$echocmd abc` & `$echocmd def` & `$echocmd hij`
610610

611611
# readlines(::Cmd), accidentally broken in #20203
612-
@test sort(readlines(`$lscmd -A`)) == sort(readdir())
612+
let str = "foo\nbar"
613+
@test readlines(`$echocmd $str`) == split(str)
614+
end
613615

614616
# issue #19864 (PR #20497)
615617
let c19864 = readchomp(pipeline(ignorestatus(

0 commit comments

Comments
 (0)