aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-08-12 14:18:08 +0200
committerLars Ingebrigtsen2021-08-12 14:18:08 +0200
commitcb039170342948fad2a005c074dc77d486db0f53 (patch)
tree575e5b9425df4e3ce2027c66c203e311bc0fb9ab /test/src
parent9445d7bf8c3f73a400e9eb6bb3617788d9421b62 (diff)
downloademacs-cb039170342948fad2a005c074dc77d486db0f53.tar.gz
emacs-cb039170342948fad2a005c074dc77d486db0f53.zip
Add XLFD font parsing tests
* test/src/font-tests.el (font-parse-xlfd-test): Add some tests for XLFD testing (bug#35816).
Diffstat (limited to 'test/src')
-rw-r--r--test/src/font-tests.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/src/font-tests.el b/test/src/font-tests.el
index de153b8de9b..ea57b122f4f 100644
--- a/test/src/font-tests.el
+++ b/test/src/font-tests.el
@@ -159,6 +159,31 @@ expected font properties from parsing NAME.")
159 (insert "\n")))) 159 (insert "\n"))))
160 (goto-char (point-min))) 160 (goto-char (point-min)))
161 161
162(ert-deftest font-parse-xlfd-test ()
163 ;; Normal number of segments.
164 (should (equal (font-get
165 (font-spec :name "-GNU -FreeSans-semibold-italic-normal-*-*-*-*-*-*-0-iso10646-1")
166 :family)
167 'FreeSans))
168 (should (equal (font-get
169 (font-spec :name "-GNU -FreeSans-semibold-italic-normal-*-*-*-*-*-*-0-iso10646-1")
170 :foundry)
171 'GNU\ ))
172 ;; Dash in the family name.
173 (should (equal (font-get
174 (font-spec :name "-Take-mikachan-PS-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1")
175 :family)
176 'mikachan-PS))
177 (should (equal (font-get
178 (font-spec :name "-Take-mikachan-PS-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1")
179 :weight)
180 'normal))
181 ;; Synthetic test.
182 (should (equal (font-get
183 (font-spec :name "-foundry-name-with-lots-of-dashes-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1")
184 :family)
185 'name-with-lots-of-dashes)))
186
162;; Local Variables: 187;; Local Variables:
163;; no-byte-compile: t 188;; no-byte-compile: t
164;; End: 189;; End: