summaryrefslogtreecommitdiff
path: root/tests/1.rstest
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2009-04-21 17:52:07 +0200
committerMichael Biebl <biebl@debian.org>2009-04-21 17:52:07 +0200
commitab9c4e360b143e9b9f78ae80c9da62ecc131e672 (patch)
treec7b6a54f7c605e7bdf74bdfd884b912efa17cace /tests/1.rstest
parentae1b7835db7c4a74ff2d2e48b34f6905a54e8627 (diff)
downloadrsyslog-ab9c4e360b143e9b9f78ae80c9da62ecc131e672.tar.gz
Imported Upstream version 3.22.0upstream/3.22.0
Diffstat (limited to 'tests/1.rstest')
-rw-r--r--tests/1.rstest26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/1.rstest b/tests/1.rstest
new file mode 100644
index 0000000..5c15258
--- /dev/null
+++ b/tests/1.rstest
@@ -0,0 +1,26 @@
+# a simple RainerScript test
+result: 0
+in:
+'test 1' <> $var or /* some comment */($SEVERITY == -4 +5 -(3 * - 2) and $fromhost == '127.0.0.1') then
+$$$
+out:
+00000000: PUSHCONSTANT test 1[cstr]
+00000001: PUSHMSGVAR var[cstr]
+00000002: !=
+00000003: PUSHMSGVAR severity[cstr]
+00000004: PUSHCONSTANT 4[nbr]
+00000005: UNARY_MINUS
+00000006: PUSHCONSTANT 5[nbr]
+00000007: +
+00000008: PUSHCONSTANT 3[nbr]
+00000009: PUSHCONSTANT 2[nbr]
+00000010: UNARY_MINUS
+00000011: *
+00000012: -
+00000013: ==
+00000014: PUSHMSGVAR fromhost[cstr]
+00000015: PUSHCONSTANT 127.0.0.1[cstr]
+00000016: ==
+00000017: and
+00000018: or
+$$$