groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 04/33: [tests]: Validate operation of ec.tmac file.


From: G. Branden Robinson
Subject: [groff] 04/33: [tests]: Validate operation of ec.tmac file.
Date: Sun, 16 Oct 2022 15:52:16 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 20ad38d1850bc2f8d81c1387620363ba7e0e1e42
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Mon Oct 10 11:06:02 2022 -0500

    [tests]: Validate operation of ec.tmac file.
    
    * tmac/tests/ec_works.sh: Add unit test to validate use of EC fonts when
      "-mec" option given.
    
    * tmac/tmac.am (tmac_TESTS): Run test.
---
 ChangeLog              |  6 ++++++
 tmac/tests/ec_works.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
 tmac/tmac.am           |  1 +
 3 files changed, 52 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 161b702e9..c3c1ba49e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * tmac/tests/ec_works.sh: Add unit test to validate use of EC
+       fonts when "-mec" option given.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2022-10-10  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * tmac/latin2.tmac:
diff --git a/tmac/tests/ec_works.sh b/tmac/tests/ec_works.sh
new file mode 100755
index 000000000..42ce59bcb
--- /dev/null
+++ b/tmac/tests/ec_works.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of groff.
+#
+# groff is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Verify that the EC fonts get loaded by using their Euro and per mille
+# glyphs (which aren't in the CM fonts) to detect them.
+input='.ec @
+.de EM
+.  ft @@$1
+.  nop @[Eu] @[%0]
+..
+.nf
+.EM TR
+.EM TI
+.EM TB
+.EM TBI
+.EM HR
+.EM HI
+.EM HB
+.EM HBI
+.EM CW
+.EM CWI'
+
+output=$(printf "%s\n" "$input" | "$groff" -mec -Tdvi -z 2>&1)
+test -z "$output"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 57e2e4ec8..941abcd84 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -195,6 +195,7 @@ tmac_TESTS = \
   tmac/tests/e_ld-works.sh \
   tmac/tests/e_line-numbering-works.sh \
   tmac/tests/e_rejects-too-short-page-lengths.sh \
+  tmac/tests/ec_works.sh \
   tmac/tests/latin2_works.sh \
   tmac/tests/latin5_works.sh \
   tmac/tests/latin9_works.sh \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]