summaryrefslogtreecommitdiffstats
path: root/tests/abort-uncleancfg-badcfg-check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/abort-uncleancfg-badcfg-check.sh')
-rwxr-xr-xtests/abort-uncleancfg-badcfg-check.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/abort-uncleancfg-badcfg-check.sh b/tests/abort-uncleancfg-badcfg-check.sh
new file mode 100755
index 0000000..aa09eef
--- /dev/null
+++ b/tests/abort-uncleancfg-badcfg-check.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# Copyright 2015-01-29 by Tim Eifler
+# This file is part of the rsyslog project, released under ASL 2.0
+# The configuration test should fail because of the invalid config file.
+. ${srcdir:=.}/diag.sh init
+../tools/rsyslogd -C -N1 -f$srcdir/testsuites/abort-uncleancfg-badcfg.conf -M../runtime/.libs:../.libs
+if [ $? == 0 ]; then
+ echo "Error: config check should fail"
+ error_exit 1
+fi
+printf 'unclean config lead to exit, as expected - OK\n'
+exit_test
+