From 75e95e09d162331bfa20e8eeca5c5695d295d6c2 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 17 Jun 2020 14:03:43 -0700 Subject: [PATCH 1/1] Verify unknown config fields raise errors --- tests/reject-unknown-field.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tests/reject-unknown-field.sh 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 -- 2.44.1