rsyslog/tests/rscript_str2num_empty.sh
Rainer Gerhards e6ea9a1ac6 testbench: enable more tests on BSD
... by fixing command lines that are not valid under BSD.
2017-12-02 10:32:01 +01:00

25 lines
723 B
Bash
Executable File

#!/bin/bash
# add 2017-02-09 by Jan Gerhards, released under ASL 2.0
. $srcdir/diag.sh init
. $srcdir/diag.sh generate-conf
. $srcdir/diag.sh add-conf '
module(load="../plugins/imtcp/.libs/imtcp")
input(type="imtcp" port="13514")
set $!ip!v1 = 1+"";
template(name="outfmt" type="string" string="%!ip%\n")
local4.* action(type="omfile" file="rsyslog.out.log" template="outfmt")
'
. $srcdir/diag.sh startup
. $srcdir/diag.sh tcpflood -m1 -y
. $srcdir/diag.sh shutdown-when-empty
. $srcdir/diag.sh wait-shutdown
echo '{ "v1": 1 }' | cmp - rsyslog.out.log
if [ ! $? -eq 0 ]; then
echo "invalid function output detected, rsyslog.out.log is:"
cat rsyslog.out.log
. $srcdir/diag.sh error-exit 1
fi;
. $srcdir/diag.sh exit