Skip to content
This repository was archived by the owner on Sep 19, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
environment:
matrix:
- julia_version: 1.2
- julia_version: 1.3
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

matrix:
allow_failures:
- julia_version: 1.3
- julia_version: nightly
# matrix:
# allow_failures:
# - julia_version: 1.3
# - julia_version: nightly

branches:
only:
Expand Down
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ os:
- linux
- osx
julia:
- 1.2
- 1.3
- nightly
matrix:
allow_failures:
- julia: 1.3
- julia: nightly
# matrix:
# allow_failures:
# - julia: 1.3
# - julia: nightly
after_success:
- if [ "$TRAVIS_JULIA_VERSION" = "nightly" ]; then julia -e "cd(Pkg.dir(\"${JL_PKG}\")); Pkg.add(\"Coverage\"); using Coverage; Coveralls.submit(Coveralls.process_folder())"; fi
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name = "Expect"
uuid = "6a31a4e8-6e70-5a2d-b005-bc2d500d80a5"
repo = "https://github.com/PerezHz/Expect.jl.git"
version = "0.2.0"
version = "0.3.0"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
julia = "≥ 1.1.0"
julia = "≥ 1.3.0"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
6 changes: 3 additions & 3 deletions src/Expect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export ExpectTimeout, ExpectEOF

## Imports
import Base.Libc: strerror
import Base: Process, TTY, wait, wait_readnb, wait_readbyte
import Base: Process, TTY, wait, wait_readnb, wait_close
import Base: kill, process_running, process_exited, success
import Base: write, print, println, flush, eof, close
import Base: read, readbytes!, readuntil
Expand Down Expand Up @@ -197,9 +197,9 @@ function wait_readnb(proc::ExpectProc, nb::Int; timeout::Real=proc.timeout)
end
end

function wait_readbyte(proc::ExpectProc, c::UInt8; timeout::Real=proc.timeout)
function wait_close(proc::ExpectProc; timeout::Real=proc.timeout)
_timed_wait(proc; timeout=timeout) do
wait_readbyte(proc.in_stream, c)
@show wait_close(proc.in_stream)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_timeout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include("prelude.jl")
@test_throws ExpectTimeout readbytes!(proc, Vector{UInt8}(undef, 1))
@test_throws ExpectTimeout readuntil(proc, '\n')
@test_throws ExpectTimeout Base.wait_readnb(proc, 1)
@test_throws ExpectTimeout Base.wait_readbyte(proc, UInt8('\n'))
@test_throws ExpectTimeout Base.wait_close(proc)
@test_throws ExpectTimeout read(proc, String)
@test_throws ExpectTimeout readline(proc)
@test process_running(proc)
Expand Down