Test all not_eq for family names.

Any early out checks must give the same answer as FcConfigCompareValue.
An accelerator was added for family names which treated all ops as if
they were FcOpEqual, giving the wrong answer for other non-equivalent ops
(for example FcOpContains or FcOpNotEqual).

This adds a test which passes before the accelerator was introduced,
fails after, and will pass again after !142 lands. This tests the all
not_eq case.
This commit is contained in:
Ben Wagner 2020-12-09 18:55:12 -05:00
parent d243bb3f88
commit b1e1a87512
3 changed files with 28 additions and 0 deletions

View File

@ -44,6 +44,7 @@ TESTDATA = \
4x6.pcf \ 4x6.pcf \
8x16.pcf \ 8x16.pcf \
fonts.conf.in \ fonts.conf.in \
test-45-generic.json \
test-60-generic.json \ test-60-generic.json \
test-90-synthetic.json \ test-90-synthetic.json \
$(NULL) $(NULL)

View File

@ -40,6 +40,7 @@ if [ ! -f ${RUNNER} ]; then
fi fi
for i in \ for i in \
45-generic.conf \
60-generic.conf \ 60-generic.conf \
90-synthetic.conf \ 90-synthetic.conf \
; do ; do

26
test/test-45-generic.json Normal file
View File

@ -0,0 +1,26 @@
{
"fonts": [
{
"family": "Foo"
},
{
"family": "math"
},
{
"family": "Baz"
}
],
"tests": [
{
"method": "match",
"query": {
"family": "Bar",
"lang": "und-zmth"
},
"result": {
"family": "math",
"lang": "und-zmth"
}
}
]
}