Blame tests/strict_prefix_matching_1.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 "one rule is strict prefix of a longer one"
Packit 1422b7
add_rule 'version=2'
Packit 1422b7
add_rule 'rule=:a word %w1:word%'
Packit 1422b7
add_rule 'rule=:a word %w1:word% another word %w2:word%'
Packit 1422b7
Packit 1422b7
execute 'a word w1 another word w2'
Packit 1422b7
assert_output_json_eq '{ "w2": "w2", "w1": "w1" }'
Packit 1422b7
Packit 1422b7
execute 'a word w1'
Packit 1422b7
assert_output_json_eq '{ "w1": "w1" }'
Packit 1422b7
Packit 1422b7
cleanup_tmp_files