rsyslog/tests/json_var_case.sh
Peter Portante 84f5608157 Fix upper and mixed case variable references
We could not reference mixed or upper case variables properly prior to
this change, as they were always lowercased before references were
pulled.

The new "option.casesensitive" for templates allows folks to turn on
variable name reference case sensitivity on a template by template
basis.
2015-12-19 16:17:11 +00:00

16 lines
852 B
Bash
Executable File

#!/bin/bash
# added 2015-11-24 by portant
# This file is part of the rsyslog project, released under ASL 2.0
echo ===========================================================================================
echo \[json_var_case.sh\]: test for JSON upper and lower case variables, and leading underscores
. $srcdir/diag.sh init
. $srcdir/diag.sh startup json_var_case.conf
. $srcdir/diag.sh tcpflood -m 1 -M "\"<167>Nov 6 12:34:56 172.0.0.1 test: @cee: { \\\"abc\\\": \\\"1\\\", \\\"ABC\\\": \\\"2\\\", \\\"aBc\\\": \\\"3\\\", \\\"_abc\\\": \\\"4\\\", \\\"_ABC\\\": \\\"5\\\", \\\"_aBc\\\": \\\"6\\\" }\""
echo doing shutdown
. $srcdir/diag.sh shutdown-when-empty
echo wait on shutdown
. $srcdir/diag.sh wait-shutdown
# NOTE: conf file updates _aBc to "7"
. $srcdir/diag.sh content-check "abc:1 ABC:2 aBc:3 _abc:4 _ABC:5 _aBc:7"
. $srcdir/diag.sh exit