summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wagner <bungeman@chromium.org>2020-12-09 18:55:12 -0500
committerBen Wagner <bungeman@chromium.org>2020-12-28 11:01:38 -0500
commitb1e1a87512c2352c03ecda9494a1f09e860723d2 (patch)
tree0d78d9364d3d507a75c39df2509d1ac1c783961f
parentd243bb3f8811a495f5edec26ffd94ef3d760eac0 (diff)
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.
-rw-r--r--test/Makefile.am1
-rw-r--r--test/run-test-conf.sh1
-rw-r--r--test/test-45-generic.json26
3 files changed, 28 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 30d8c2a..2117ef0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -44,6 +44,7 @@ TESTDATA = \
4x6.pcf \
8x16.pcf \
fonts.conf.in \
+ test-45-generic.json \
test-60-generic.json \
test-90-synthetic.json \
$(NULL)
diff --git a/test/run-test-conf.sh b/test/run-test-conf.sh
index e085e82..6fad983 100644
--- a/test/run-test-conf.sh
+++ b/test/run-test-conf.sh
@@ -40,6 +40,7 @@ if [ ! -f ${RUNNER} ]; then
fi
for i in \
+ 45-generic.conf \
60-generic.conf \
90-synthetic.conf \
; do
diff --git a/test/test-45-generic.json b/test/test-45-generic.json
new file mode 100644
index 0000000..665d7c3
--- /dev/null
+++ b/test/test-45-generic.json
@@ -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"
+ }
+ }
+ ]
+}