summaryrefslogtreecommitdiffstats
path: root/tests/empty-app-name.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/empty-app-name.sh')
-rwxr-xr-xtests/empty-app-name.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/empty-app-name.sh b/tests/empty-app-name.sh
new file mode 100755
index 0000000..1b07c2e
--- /dev/null
+++ b/tests/empty-app-name.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+# addd 2019-12-27 by RGerhards, released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+generate_conf
+add_conf '
+module(load="../plugins/imtcp/.libs/imtcp")
+input(type="imtcp" port="0" listenPortFileName="'$RSYSLOG_DYNNAME'.tcpflood_port")
+global(parser.PermitSlashInProgramname="off")
+
+template(name="outfmt" type="string" string="%syslogtag%,%programname%,%app-name%\n")
+local0.* action(type="omfile" template="outfmt" file="'$RSYSLOG_OUT_LOG'")
+'
+startup
+tcpflood -m 1 -M "\"<133>Aug 6 16:57:54 host /no-app-name msgh ...x\""
+shutdown_when_empty
+wait_shutdown
+export EXPECTED="/no-app-name,,-"
+cmp_exact
+exit_test