Blame tests/strict_prefix_matching_2.sh

Packit 1422b7
# added 2015-11-05 by Rainer Gerhards
Packit 1422b7
# This file is part of the liblognorm project, released under ASL 2.0
Packit 1422b7
Packit 1422b7
. $srcdir/exec.sh
Packit 1422b7
Packit 1422b7
test_def $0 "named literal compaction"
Packit 1422b7
add_rule 'version=2'
Packit 1422b7
add_rule 'rule=:a word %w1:word% %l1:literal{"text":"l"}% b'
Packit 1422b7
add_rule 'rule=:a word %w1:word% %l2:literal{"text":"l2"}% b'
Packit 1422b7
add_rule 'rule=:a word %w1:word% l3 b'
Packit 1422b7
Packit 1422b7
execute 'a word w1 l b'
Packit 1422b7
assert_output_json_eq '{ "l1": "l", "w1": "w1" }'
Packit 1422b7
Packit 1422b7
execute 'a word w1 l2 b'
Packit 1422b7
assert_output_json_eq '{ "l2": "l2", "w1": "w1" }'
Packit 1422b7
Packit 1422b7
execute 'a word w1 l3 b'
Packit 1422b7
assert_output_json_eq '{ "w1": "w1" }'
Packit 1422b7
Packit 1422b7
cleanup_tmp_files