diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-12 14:18:08 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-12 14:18:08 +0200 |
commit | cb039170342948fad2a005c074dc77d486db0f53 (patch) | |
tree | 575e5b9425df4e3ce2027c66c203e311bc0fb9ab /test | |
parent | 9445d7bf8c3f73a400e9eb6bb3617788d9421b62 (diff) | |
download | emacs-cb039170342948fad2a005c074dc77d486db0f53.tar.gz |
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')
-rw-r--r-- | test/src/font-tests.el | 25 |
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.") (insert "\n")))) (goto-char (point-min))) +(ert-deftest font-parse-xlfd-test () + ;; Normal number of segments. + (should (equal (font-get + (font-spec :name "-GNU -FreeSans-semibold-italic-normal-*-*-*-*-*-*-0-iso10646-1") + :family) + 'FreeSans)) + (should (equal (font-get + (font-spec :name "-GNU -FreeSans-semibold-italic-normal-*-*-*-*-*-*-0-iso10646-1") + :foundry) + 'GNU\ )) + ;; Dash in the family name. + (should (equal (font-get + (font-spec :name "-Take-mikachan-PS-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1") + :family) + 'mikachan-PS)) + (should (equal (font-get + (font-spec :name "-Take-mikachan-PS-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1") + :weight) + 'normal)) + ;; Synthetic test. + (should (equal (font-get + (font-spec :name "-foundry-name-with-lots-of-dashes-normal-normal-normal-*-*-*-*-*-*-0-iso10646-1") + :family) + 'name-with-lots-of-dashes))) + ;; Local Variables: ;; no-byte-compile: t ;; End: |