bug-gnu-utils
[Top][All Lists]
Advanced

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

[PATCH 2/3] sed: testsuite for infinite loop in some EUC-JP replacements


From: Stanislav Brabec
Subject: [PATCH 2/3] sed: testsuite for infinite loop in some EUC-JP replacements
Date: Fri, 10 Feb 2012 20:41:38 +0100

Here is a testsuite for PATCH 1/3 for sed.

Please let me know whether it correctly passes the mail client. It
contains EUC-JP characters.

Index: sed-4.2.1/testsuite/Makefile.am
===================================================================
--- sed-4.2.1.orig/testsuite/Makefile.am
+++ sed-4.2.1/testsuite/Makefile.am
@@ -18,7 +18,7 @@ SEDTESTS += space
 endif
 
 SEDTESTS += \
-        appquit enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
+        appquit eucjp enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
        modulo numsub numsub2 numsub3 numsub4 numsub5 0range bkslashes \
        head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
        fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
@@ -51,6 +51,7 @@ EXTRA_DIST = \
        dollar.good dollar.inp dollar.sed \
        empty.good empty.inp empty.sed \
        enable.good enable.inp enable.sed \
+       eucjp.good eucjp.inp eucjp.sed \
        eval.good eval.inp eval.sed \
        factor.good factor.inp factor.sed \
        fasts.good fasts.inp fasts.sed \
Index: sed-4.2.1/testsuite/eucjp.good
===================================================================
--- /dev/null
+++ sed-4.2.1/testsuite/eucjp.good
@@ -0,0 +1,5 @@
+aa��a����
+aaa��a����
+aaaa��a����
+aaaaa��a����
+����*����
Index: sed-4.2.1/testsuite/eucjp.sed
===================================================================
--- /dev/null
+++ sed-4.2.1/testsuite/eucjp.sed
@@ -0,0 +1 @@
+s/��/*/g
Index: sed-4.2.1/testsuite/eucjp.inp
===================================================================
--- /dev/null
+++ sed-4.2.1/testsuite/eucjp.inp
@@ -0,0 +1,5 @@
+aa��a����
+aaa��a����
+aaaa��a����
+aaaaa��a����
+���跽����
Index: sed-4.2.1/testsuite/Makefile.tests
===================================================================
--- sed-4.2.1.orig/testsuite/Makefile.tests
+++ sed-4.2.1/testsuite/Makefile.tests
@@ -48,6 +48,12 @@ badenc::
        $(CMP) $(srcdir)/address@hidden address@hidden 
        @$(RM) address@hidden 
 
+eucjp::
+       LANG=ja_JP.EUC-JP $(TIME) $(SED) -f $(srcdir)/address@hidden \
+               < $(srcdir)/address@hidden | $(TR) -d \\r > address@hidden
+       $(CMP) $(srcdir)/address@hidden address@hidden
+       @$(RM) address@hidden
+
 # Try with ru_RU.UTF-8.  If it is presumably not installed, see if the current
 # locale is UTF-8 and run it in the current locale.
 utf8-1 utf8-2 utf8-3 utf8-4::


-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: address@hidden
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




reply via email to

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