]> git.scottworley.com Git - pinch/blobdiff - tests/reject-unknown-field.sh
Verify unknown config fields raise errors
[pinch] / tests / reject-unknown-field.sh
diff --git a/tests/reject-unknown-field.sh b/tests/reject-unknown-field.sh
new file mode 100755 (executable)
index 0000000..dfe069c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. ./tests/lib/test-setup.sh
+
+foo_setup
+
+echo "whatisthis = I don't even" >> "$conf"
+
+if python3 ./pinch.py pin "$conf";then
+  echo "FAIL: Config with unknown field should be rejected"
+  exit 1
+else
+  echo PASS
+fi