summaryrefslogtreecommitdiffstats
path: root/tests/rscript_re_match-dbl_quotes.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rscript_re_match-dbl_quotes.sh')
-rwxr-xr-xtests/rscript_re_match-dbl_quotes.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rscript_re_match-dbl_quotes.sh b/tests/rscript_re_match-dbl_quotes.sh
new file mode 100755
index 0000000..ebc7ae4
--- /dev/null
+++ b/tests/rscript_re_match-dbl_quotes.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Test that '$' in double-quoted string constants raise a meaningful
+# error message and do not cause rsyslog to segfault.
+# added 2019-12-30 by Rainer Gerhards
+# This file is part of the rsyslog project, released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+generate_conf
+add_conf '
+action(type="omfile" file="'$RSYSLOG_OUT_LOG'") # order is important ...
+set $!test="test$" # ... as after this syntax error nothing is really taken up
+'
+startup
+shutdown_when_empty
+wait_shutdown
+content_check '$-sign in double quotes must be escaped'
+exit_test