diff options
Diffstat (limited to 'test_merge.bash')
-rw-r--r-- | test_merge.bash | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test_merge.bash b/test_merge.bash new file mode 100644 index 00000000..35390aaa --- /dev/null +++ b/test_merge.bash @@ -0,0 +1,24 @@ +#!/bin/bash +set -ue +result="" +cleanup() { + if [ -n "$result" ] ; then + rm -f $result + fi +} +trap cleanup EXIT +result=$(mktemp /tmp/test_merge.XXXXXX) +fail=0 +python merge.py examples/source.yaml > $result +if ! cmp $result examples/source_lib_result.yaml ; then + diff -u $result examples/source_lib_result.yaml + echo + echo FAIL - merge of source.yaml result does not match expected output + echo + fail=1 +else + echo + echo PASS - merge of source.yaml result matches expected output + echo +fi +exit $fail |