git » summer » commit 4f282bc

test: Minor bash style fixes

author Alberto Bertogli
2023-08-19 11:13:08 UTC
committer Alberto Bertogli
2023-08-19 11:19:18 UTC
parent d113d75ef8073cc48773c4950561cca0de1d4ca2

test: Minor bash style fixes

Add some missing quotes (which help support directories with spaces),
and other minor style fixes caught by shellcheck.

test/cover.sh +1 -1
test/test.sh +3 -2

diff --git a/test/cover.sh b/test/cover.sh
index 8f7154d..90dd6b4 100755
--- a/test/cover.sh
+++ b/test/cover.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 set -e
-cd $(realpath "$(dirname "$0")" )
+cd "$(realpath "$(dirname "$0")" )"
 
 export GOCOVERDIR="$PWD/.cover/"
 rm -rf "${GOCOVERDIR?}"
diff --git a/test/test.sh b/test/test.sh
index 3360ac8..7d7fa09 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -1,11 +1,12 @@
 #!/bin/bash
 
 set -e
-cd $(realpath "$(dirname "$0")" )
+cd "$(realpath "$(dirname "$0")" )"
 
 # shellcheck disable=SC2086
 ( cd ..; go build $BUILDARGS -o summer . )
 
-TARGETS="${@:-./*.t}"
+TARGETS="${*:-./*.t}"
 
+# shellcheck disable=SC2086
 cram3 $TARGETS