From: Scott Worley Date: Wed, 17 Jun 2020 21:03:43 +0000 (-0700) Subject: Verify unknown config fields raise errors X-Git-Tag: 2.0.0~3 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/75e95e09d162331bfa20e8eeca5c5695d295d6c2?ds=sidebyside;hp=9d2c406b0eb069369289350f419b73a2e610a0a4 Verify unknown config fields raise errors --- diff --git a/tests/reject-unknown-field.sh b/tests/reject-unknown-field.sh new file mode 100755 index 0000000..dfe069c --- /dev/null +++ b/tests/reject-unknown-field.sh @@ -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