3 test_description
='ref_match.awk functionality with trailer chars 0x21-0x2E'
9 ap
="$(tg --awk-path)" && test -n "$ap" && test -d "$ap" || die
11 test -f "$aprm" && test -r "$aprm" && test -x "$aprm" || die
15 test_expect_success
'ref_match runs' '
16 # some stupid awks might not even compile it
17 awk -f "$aprm" </dev/null
20 test_expect_success
'ref_match normal order specials' '
37 " && printf >expect "%s" "\
44 0007 object refs/t'\''
53 " && awk -f "$aprm" <input >actual &&
54 test_cmp expect actual
57 test_expect_success
'ref_match pckdrefs order specials' '
74 " && printf >expect "%s" "\
81 0007 object refs/t'\''
90 " && awk -v pckdrefs=1 -f "$aprm" <input >actual &&
91 test_cmp expect actual
94 test_expect_success
'ref_match normal order specials versus slash' '
112 " && printf >expect "%s" "\
126 00dd object refs/d\$d
129 " && awk -f "$aprm" <input >actual &&
130 test_cmp expect actual
133 test_expect_success
'ref_match pckdrefs order specials versus slash' '
134 printf >input "%s" "\
151 " && printf >expect "%s" "\
165 00dd object refs/d\$d
168 " && awk -v pckdrefs=1 -f "$aprm" <input >actual &&
169 test_cmp expect actual