File: test_cli_ctrlc.exp

package info (click to toggle)
fq 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 106,624 kB
  • sloc: xml: 2,835; makefile: 250; sh: 241; exp: 57; ansic: 21
file content (19 lines) | stat: -rw-r--r-- 305 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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
}