git » chasquid » commit 43e98e0

test: Minor bash style fixes to t-04-aliases

author Alberto Bertogli
2023-10-07 11:07:54 UTC
committer Alberto Bertogli
2023-10-07 11:41:57 UTC
parent 669bccc13f8db3a127a906df7bd609d482e57431

test: Minor bash style fixes to t-04-aliases

This patch contains minor bash style fixes to test/t-04-aliases, for
readability and consistency.

test/t-04-aliases/chasquid-util.sh +1 -1
test/t-04-aliases/run.sh +1 -1

diff --git a/test/t-04-aliases/chasquid-util.sh b/test/t-04-aliases/chasquid-util.sh
index 576c67d..1d1f26c 100755
--- a/test/t-04-aliases/chasquid-util.sh
+++ b/test/t-04-aliases/chasquid-util.sh
@@ -2,5 +2,5 @@
 # Wrapper so chamuyero scripts can invoke chasquid-util for testing.
 
 # Run from the config directory because data_dir is relative.
-cd config
+cd config || exit 1
 go run ../../../cmd/chasquid-util/chasquid-util.go -C=. "$@"
diff --git a/test/t-04-aliases/run.sh b/test/t-04-aliases/run.sh
index f2a8873..1244e15 100755
--- a/test/t-04-aliases/run.sh
+++ b/test/t-04-aliases/run.sh
@@ -21,7 +21,7 @@ function send_and_check() {
 		mail_diff content ".mail/$i@testserver"
 		rm -f ".mail/$i@testserver"
 	done
-	if ! [ -z "$(ls .mail/)" ]; then
+	if [ -n "$(ls .mail/)" ]; then
 		fail "unexpected mail was delivered: $(ls .mail/)"
 	fi
 }