diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/snapshots/failure-interactive-without-tty | 3 | ||||
-rwxr-xr-x | tests/stateless-journey.sh | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/snapshots/failure-interactive-without-tty b/tests/snapshots/failure-interactive-without-tty new file mode 100644 index 0000000..e0065af --- /dev/null +++ b/tests/snapshots/failure-interactive-without-tty @@ -0,0 +1,3 @@ +[?1049h[?1049lerror: Interactive mode requires a connected terminal +Caused by: + 1: Inappropriate ioctl for device (os error 25)
\ No newline at end of file diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh index 5625035..6c112b7 100755 --- a/tests/stateless-journey.sh +++ b/tests/stateless-journey.sh @@ -44,7 +44,7 @@ WITH_FAILURE=1 (with "no option to adjust the total" it "produces a human-readable aggregate, with total" && { WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths" \ - expect_run ${SUCCESSFULLY} "$exe" aggregate . . dir ./dir/ ./dir/sub + expect_run ${SUCCESSFULLY} "$exe" a . . dir ./dir/ ./dir/sub } ) (with "the --no-total option set" @@ -96,4 +96,10 @@ WITH_FAILURE=1 ) ) ) + (with "interactive mode" + it "fails as there is no TTY connected" && { + WITH_SNAPSHOT="$snapshot/failure-interactive-without-tty" \ + expect_run ${WITH_FAILURE} "$exe" i + } + ) ) |