mirror of
https://github.com/wader/fq.git
synced 2024-12-27 15:42:07 +03:00
20 lines
305 B
Plaintext
20 lines
305 B
Plaintext
|
#!/usr/bin/env expect
|
||
|
|
||
|
log_user 1
|
||
|
set timeout 3
|
||
|
|
||
|
expect_after {
|
||
|
timeout {exit 1}
|
||
|
}
|
||
|
|
||
|
spawn sh -c "cat | fq 2>&1"
|
||
|
sleep 1
|
||
|
# ctrl-c
|
||
|
send "\x03"
|
||
|
expect eof
|
||
|
|
||
|
# should not have outputted anything except maybe "^C", seems flakey
|
||
|
if { $expect_out(buffer) != "" && $expect_out(buffer) != "^C" } {
|
||
|
exit 1
|
||
|
}
|