diff options
-rw-r--r-- | tests/Makefile.am | 3 | ||||
-rwxr-xr-x | tests/rscript_contains.sh | 13 | ||||
-rw-r--r-- | tests/testsuites/rscript_contains.conf | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index c4560445..a9369929 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -64,6 +64,7 @@ TESTS += \ failover-no-rptd.sh \ failover-no-basic.sh \ rcvr_fail_restore.sh \ + rscript_contains.sh \ linkedlistqueue.sh if HAVE_VALGRIND @@ -264,6 +265,8 @@ EXTRA_DIST= 1.rstest 2.rstest 3.rstest err1.rstest \ testsuites/diskqueue.conf \ arrayqueue.sh \ testsuites/arrayqueue.conf \ + rscript_contains.sh \ + testsuites/rscript_contains.conf \ linkedlistqueue.sh \ testsuites/linkedlistqueue.conf \ da-mainmsg-q.sh \ diff --git a/tests/rscript_contains.sh b/tests/rscript_contains.sh new file mode 100755 index 00000000..fd5c3354 --- /dev/null +++ b/tests/rscript_contains.sh @@ -0,0 +1,13 @@ +# added 2012-09-14 by rgerhards +# This file is part of the rsyslog project, released under ASL 2.0 +echo =============================================================================== +echo \[rscript_contains.sh\]: test for contains script-filter +source $srcdir/diag.sh init +source $srcdir/diag.sh startup rscript_contains.conf +source $srcdir/diag.sh injectmsg 0 5000 +echo doing shutdown +source $srcdir/diag.sh shutdown-when-empty +echo wait on shutdown +source $srcdir/diag.sh wait-shutdown +source $srcdir/diag.sh seq-check 0 4999 +source $srcdir/diag.sh exit diff --git a/tests/testsuites/rscript_contains.conf b/tests/testsuites/rscript_contains.conf new file mode 100644 index 00000000..434f0229 --- /dev/null +++ b/tests/testsuites/rscript_contains.conf @@ -0,0 +1,4 @@ +$IncludeConfig diag-common.conf + +$template outfmt,"%msg:F,58:2%\n" +if $msg contains 'msgnum' then ./rsyslog.out.log |