diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-07-07 12:04:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-07-07 12:04:33 +0200 |
commit | 493d6a799be82a2df652b666d541a5e004ebcc76 (patch) | |
tree | 4d745d49abbde25f95cda0a7ebb59e81aabf7477 /tests/1.rstest | |
parent | 37fd063042821dc328c88e1f7366543decdcb76f (diff) | |
download | rsyslog-493d6a799be82a2df652b666d541a5e004ebcc76.tar.gz rsyslog-493d6a799be82a2df652b666d541a5e004ebcc76.tar.bz2 rsyslog-493d6a799be82a2df652b666d541a5e004ebcc76.zip |
changed RainerScript testbench to a full-blow test suite
it now works based on test case files, which enable to quickly
generate test cases.
Diffstat (limited to 'tests/1.rstest')
-rw-r--r-- | tests/1.rstest | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/1.rstest b/tests/1.rstest new file mode 100644 index 00000000..5c152589 --- /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 +$$$ |