summaryrefslogtreecommitdiffstats
path: root/tests/rscript_re_match-dbl_quotes.sh
blob: ebc7ae42be2d26d627a7a5b52ff45a93a170573b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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