aboutsummaryrefslogtreecommitdiff
path: root/tests/signals.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-01-24 14:56:02 -0300
committerEuAndreh <eu@euandre.org>2021-01-24 14:56:02 -0300
commitb9061b44194c6564364ee41dfda17df171547cf4 (patch)
tree7f1c15858005b4f827f879e52b3d3ad5f9cc7fa6 /tests/signals.sh
parentremembering: Append to in-memory string instead of intermediate file (diff)
downloadremembering-b9061b44194c6564364ee41dfda17df171547cf4.tar.gz
remembering-b9061b44194c6564364ee41dfda17df171547cf4.tar.xz
tests: Add logs of which test is running
Diffstat (limited to '')
-rwxr-xr-xtests/signals.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/signals.sh b/tests/signals.sh
index ad7ed2d..124434c 100755
--- a/tests/signals.sh
+++ b/tests/signals.sh
@@ -4,6 +4,7 @@ set -u
. tests/lib.sh
test_status_is_zero_when_command_is_successful() {
+ testing 'status is 0 when command is successful'
printf 'a\n' | sh remembering -pp1 -c 'head -n1' 1>/dev/null 2>/dev/null
STATUS=$?
assert_status 0
@@ -15,14 +16,18 @@ test_status_is_zero_when_command_is_successful() {
seq 9 | sh remembering -pp3 -c 'grep 7' 1>/dev/null 2>/dev/null
STATUS=$?
assert_status 0
+
+ test_ok
}
test_status_is_forwarded_from_command() {
+ testing 'status is forwarded from command'
for status in $(seq 1 125); do
printf '' | sh remembering -pp4 -c "exit $status" 1>/dev/null 2>/dev/null
STATUS=$?
assert_status "$status"
done
+ test_ok
}
test_status_is_zero_when_command_is_successful