Blame tests/field_regex_invalid_args.sh
|
Packit |
1422b7 |
# added 2014-11-14 by singh.janmejay
|
|
Packit |
1422b7 |
# This file is part of the liblognorm project, released under ASL 2.0
|
|
Packit |
1422b7 |
export ln_opts='-oallowRegex'
|
|
Packit |
1422b7 |
. $srcdir/exec.sh
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
test_def $0 "invalid type for regex field with everything else defaulted"
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:[a-z]+:Q%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
reset_rules
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:[a-z]+:%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
reset_rules
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:[a-z]+:0:%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
reset_rules
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:[a-z]+:0:0q%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
reset_rules
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:[a-z]+:0a:0%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
reset_rules
|
|
Packit |
1422b7 |
add_rule 'rule=:%first:regex:::::%%%'
|
|
Packit |
1422b7 |
execute 'foo'
|
|
Packit |
1422b7 |
assert_output_contains '"originalmsg": "foo"'
|
|
Packit |
1422b7 |
assert_output_contains '"unparsed-data": "foo"'
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
|
|
Packit |
1422b7 |
cleanup_tmp_files
|
|
Packit |
1422b7 |
|