groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: Add another regression test for case transforms.


From: G. Branden Robinson
Subject: [groff] 01/01: Add another regression test for case transforms.
Date: Sun, 8 Sep 2019 13:17:07 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 8f1f2938481303f2a2ae1234427c434af02cd1ff
Author: G. Branden Robinson <address@hidden>
Date:   Mon Sep 9 03:09:23 2019 +1000

    Add another regression test for case transforms.
    
    Add regression test to check behavior of case transformation request on
    a string containing a Unicode character escape.  Right now, this is not
    supported, so it is an XFAIL test in the parlance of DejaGNU/POSIX
    1003.3.
    
    * src/roff/groff/tests/string_case_xform_unicode_escape.sh: New test.
    * src/roff/groff/groff.am: Run the test.
---
 ChangeLog                                          | 11 ++++++
 src/roff/groff/groff.am                            |  1 +
 .../tests/string_case_xform_unicode_escape.sh      | 40 ++++++++++++++++++++++
 3 files changed, 52 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 455480b..69a47dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2019-09-09  G. Branden Robinson <address@hidden>
 
+       Add regression test to check behavior of case transformation
+       request on a string containing a Unicode character escape.
+       Right now, this is not supported, so it is an XFAIL test in the
+       parlance of DejaGNU/POSIX 1003.3.
+
+       * src/roff/groff/tests/string_case_xform_unicode_escape.sh: New
+       test.
+       * src/roff/groff/groff.am: Run the test.
+
+2019-09-09  G. Branden Robinson <address@hidden>
+
        Implement .stringdown and .stringup requests.
 
        * src/roff/troff/input.cpp: Add .stringdown and .stringup
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 954c52f..b5a8adb 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -44,6 +44,7 @@ groff_TESTS = \
   src/roff/groff/tests/regression-56555.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_unicode_escape.sh \
   src/roff/groff/tests/string_case_xform_errors.sh
 TESTS += $(groff_TESTS)
 
diff --git a/src/roff/groff/tests/string_case_xform_unicode_escape.sh 
b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
new file mode 100755
index 0000000..672aec3
--- /dev/null
+++ b/src/roff/groff/tests/string_case_xform_unicode_escape.sh
@@ -0,0 +1,40 @@
+#!/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"
+
+# The following is what we expect in the future when we support Unicode
+# case transformations.
+#expected="attaché ATTACHÉ"
+#
+# For now, we expect problems.
+expected="<standard input>:4: backtrace: string 'attache'
+troff: <standard input>:5: warning: can't find special character 'U0065_0301'"
+
+actual=$("$groff" -Tutf8 2>&1 > /dev/null <<EOF
+.pl 1v
+.ds attache attach\\[u0065_0301]\\\"
+\\*[attache]
+.stringup attache
+\\*[attache]
+EOF
+)
+
+diff -u <(echo "$expected") <(echo "$actual")



reply via email to

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