groff-commit
[Top][All Lists]
Advanced

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

[groff] 02/03: Regression-test string case transform feature.


From: G. Branden Robinson
Subject: [groff] 02/03: Regression-test string case transform feature.
Date: Sun, 8 Sep 2019 12:13:22 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit e2cfd11b3e24e830978031b16d0c249e51f681d1
Author: G. Branden Robinson <address@hidden>
Date:   Thu Jul 4 00:12:39 2019 +1000

    Regression-test string case transform feature.
    
    * src/roff/groff/tests/string_case_xform_errors.sh: New test.
    * src/roff/groff/tests/string_case_xform_requests.sh: New test.
    * src/roff/groff/groff.am: Run the tests.
---
 ChangeLog                                          |  8 +++++
 src/roff/groff/groff.am                            |  4 ++-
 src/roff/groff/tests/string_case_xform_errors.sh   | 30 ++++++++++++++++++
 src/roff/groff/tests/string_case_xform_requests.sh | 36 ++++++++++++++++++++++
 4 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 8cdf137..3b30f9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-09-09  G. Branden Robinson <address@hidden>
+
+       Regression-test string case transform feature.
+
+       * src/roff/groff/tests/string_case_xform_errors.sh: New test.
+       * src/roff/groff/tests/string_case_xform_requests.sh: New test.
+       * src/roff/groff/groff.am: Run the tests.
+
 2019-06-28  G. Branden Robinson <address@hidden>
 
        devlatin1: Map \(oq to ' on output.
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index b2b3055..954c52f 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -42,7 +42,9 @@ groffopts_DATA = $(GROFF_OPTS_OUTPUT)
 
 groff_TESTS = \
   src/roff/groff/tests/regression-56555.sh \
-  src/roff/groff/tests/on-latin1-device-oq-is-0x27.sh
+  src/roff/groff/tests/on-latin1-device-oq-is-0x27.sh \
+  src/roff/groff/tests/string_case_xform_requests.sh \
+  src/roff/groff/tests/string_case_xform_errors.sh
 TESTS += $(groff_TESTS)
 
 MOSTLYCLEANFILES += groff_opts.tmp $(GROFF_OPTS_OUTPUT)
diff --git a/src/roff/groff/tests/string_case_xform_errors.sh 
b/src/roff/groff/tests/string_case_xform_errors.sh
new file mode 100755
index 0000000..56f322d
--- /dev/null
+++ b/src/roff/groff/tests/string_case_xform_errors.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+#
+# Copyright (C) 2019 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"
+
+expected="troff: <standard input>:1: cannot apply string case transformation 
to a request ('br')"
+
+actual=$("$groff" -Tutf8 2>&1 <<EOF
+.stringdown br
+EOF
+)
+
+diff -u <(echo "$expected") <(echo "$actual")
diff --git a/src/roff/groff/tests/string_case_xform_requests.sh 
b/src/roff/groff/tests/string_case_xform_requests.sh
new file mode 100755
index 0000000..a5f4c95
--- /dev/null
+++ b/src/roff/groff/tests/string_case_xform_requests.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+#
+# Copyright (C) 2019 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"
+
+expected="Résumé résumé RÉSUMÉ"
+
+actual=$("$groff" -Tutf8 <<EOF
+.pl 1v
+.ds resume R\\['e]sum\\['e]\\\"
+\\*[resume]
+.stringdown resume
+\\*[resume]
+.stringup resume
+\\*[resume]
+EOF
+)
+
+diff -u <(echo "$expected") <(echo "$actual")



reply via email to

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