aboutsummaryrefslogtreecommitdiff
path: root/tests/static
diff options
context:
space:
mode:
Diffstat (limited to 'tests/static')
-rw-r--r--tests/static17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/static b/tests/static
new file mode 100644
index 0000000..192f75b
--- /dev/null
+++ b/tests/static
@@ -0,0 +1,17 @@
+# Static checks on the script itself.
+
+if syn=$(sh -n "$VMM" 2>&1); then
+ ok "sh -n is clean"
+else
+ notok "sh -n is clean" "$syn"
+fi
+
+if command -v shellcheck >/dev/null 2>&1; then
+ if sc=$(shellcheck -s sh "$VMM" "$ROOT/test" "$ROOT"/tests/* 2>&1); then
+ ok "shellcheck is clean"
+ else
+ notok "shellcheck is clean" "$sc"
+ fi
+else
+ skip 1 "shellcheck not installed"
+fi