Skip to content

Commit

Permalink
Revert "add readline(::AbstractCmd) (#34927)" (#34958)
Browse files Browse the repository at this point in the history
This reverts commit 570f6d9.
  • Loading branch information
Keno authored and KristofferC committed Apr 11, 2020
1 parent e7f2112 commit 350eabb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions base/process.jl
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ function eachline(cmd::AbstractCmd; keep::Bool=false)
return EachLine(out, keep=keep, ondone=ondone)::EachLine
end

readline(cmd::AbstractCmd; keep::Bool=false) = first(eachline(cmd, keep=keep))

"""
open(command, mode::AbstractString, stdio=devnull)
Expand Down
8 changes: 0 additions & 8 deletions test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -670,14 +670,6 @@ end
@test repr(Base.CmdRedirect(``, devnull, 1, true)) == "pipeline(``, stdout<Base.DevNull())"
@test repr(Base.CmdRedirect(``, devnull, 11, true)) == "pipeline(``, 11<Base.DevNull())"

@testset "readline" begin
@test readline(`$(printfcmd) '\n'`) == ""
@test readline(`$(printfcmd) 'foo\n'`) == "foo"
@test readline(`$(printfcmd) 'foo\nbar\n'`) == "foo"
@test readline(yescmd) == "y"
@test readline(pipeline(`$(printfcmd) 'foo\nbar\n'`, sortcmd)) == "bar"
@test_throws ArgumentError("collection must be non-empty") readline(`$(printfcmd) ''`)
end

# clean up busybox download
if Sys.iswindows()
Expand Down

0 comments on commit 350eabb

Please sign in to comment.