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

Stanislav Brabec <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Organization SUSE Linux, s. r. o.
Message-ID <[email protected]>
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)/[email protected] [email protected] 
 	@$(RM) [email protected] 
 
+eucjp::
+	LANG=ja_JP.EUC-JP $(TIME) $(SED) -f $(srcdir)/[email protected] \
+		< $(srcdir)/[email protected] | $(TR) -d \\r > [email protected]
+	$(CMP) $(srcdir)/[email protected] [email protected]
+	@$(RM) [email protected]
+
 # 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: [email protected]
Lihovarská 1060/12                            tel: +49 911 7405384547
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.