groff-commit
[Top][All Lists]
Advanced

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

[groff] 32/38: [tmac]: Regression-test Savannah #63112 (3/3).


From: G. Branden Robinson
Subject: [groff] 32/38: [tmac]: Regression-test Savannah #63112 (3/3).
Date: Mon, 3 Oct 2022 01:42:59 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit e65ab0627cbe24775132a02c9596ad6d10983b9f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sun Oct 2 20:41:54 2022 -0500

    [tmac]: Regression-test Savannah #63112 (3/3).
    
    * tmac/tests/latin2_works: Do it.
    * tmac/tmac.am (tmac_TESTS): Run test.
    
    Test fails at this commit.
---
 ChangeLog                  |  7 +++++
 tmac/tests/latin2_works.sh | 74 ++++++++++++++++++++++++++++++++++++++++++++++
 tmac/tmac.am               |  1 +
 3 files changed, 82 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 16ff29e12..d573592a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-10-02  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [tmac]: Regression-test Savannah #63112 (3/3).
+
+       * tmac/tests/latin2_works: Do it.
+       * tmac/tmac.am (tmac_TESTS): Run test.
+
 2022-10-01  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [tmac]: Fix Savannah #63112 (2/3).
diff --git a/tmac/tests/latin2_works.sh b/tmac/tests/latin2_works.sh
new file mode 100755
index 000000000..144fcfb41
--- /dev/null
+++ b/tmac/tests/latin2_works.sh
@@ -0,0 +1,74 @@
+#!/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"
+
+fail=
+
+wail () {
+    echo "...FAILED $*"
+    fail=yes
+}
+
+input=$(\
+    printf '\\[A ho]\\[ab]\\[/L]\\[S aa]';
+    printf '\\[vS]\\[S ac]\\[T ah]\\[Z aa]\\[vZ]\\[Z a.]\n';
+    printf '\\[a ho]\\[ho]\\[/l]\\[s aa]';
+    printf '\\[vs]\\[s ac]\\[t ah]\\[z aa]\[a"]\\[vZ]\\[z a.]\n';
+    printf '\\[R aa]\\[A ab]\\[L aa]\\[C aa]';
+    printf '\\[C ah]\\[E ho]\\[E ah]\\[D ah]\n';
+    printf '\\[u0110]\\[N aa]\\[N ah]\\[O a"]';
+    printf '\\[R ah]\\[U ao]\\[U a"]\\[T ac]\n';
+    printf '\\[r aa]\\[a ab]\\[l aa]\\[c aa]';
+    printf '\\[c ah]\\[e ho]\\[e ah]\\[d ah]\n';
+    printf '\\[u0111]\\[n aa]\\[n ah]\\[o a"]';
+    printf '\\[r ah]\\[u ao]\\[u a"]\\[t ac]\\[a.]\n';
+)
+
+output=$(printf "%s\n" "$input" | "$groff" -Tlatin1 -mlatin2 \
+    | LC_ALL=C od -t c)
+printf "$output" \
+    | grep -Eq '^0000000 241 242 243 246 251 252 253 254 256 257 +' \
+    || wail "in block 0xA0"
+printf "$output" \
+    | grep -Eq '^0000000 .* 261 262 263 266 271$' \
+    || wail "in block 0xB0"
+printf "$output" \
+    | grep -Eq '^0000020 272 273 274 275 256 277 +' \
+    || wail "in block 0xB0"
+printf "$output" \
+    | grep -Eq '^0000020 .* 300 303 305 306 310 312 314 317 +$' \
+    || wail "in block 0xC0"
+printf "$output" \
+    | grep -Eq '^0000040 320 321 322 325 330 331 333 336 +' \
+    || wail "in block 0xD0"
+printf "$output" \
+    | grep -Eq '^0000040 .* 340 343 345 346 350 352 354$' \
+    || wail "in block 0xE0"
+printf "$output" \
+    | grep -Eq '^0000060 357 +' \
+    || wail "in block 0xE0"
+printf "$output" \
+    | grep -Eq '^0000060 .* 360 361 362 365 370 371 373 376 377 +$' \
+    || wail "in block 0xF0"
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index ff15609d5..57e2e4ec8 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/latin2_works.sh \
   tmac/tests/latin5_works.sh \
   tmac/tests/latin9_works.sh \
   tmac/tests/localization-works.sh \



reply via email to

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