fix y/[/X/ and add more testcases for the y command

2006-02-03  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-62
This commit is contained in:
Paolo Bonzini committed 2008-01-09 16:12:04 +01:00
1 parent ef1ea7f8bb
commit 1ca31d6728
13 files changed
+27 -9

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
2006-02-03 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.
2005-09-07 Paolo Bonzini <bonzini@gnu.org>
* lib/regcomp.c: Update from upstream.
+2
View File
@@ -23,7 +23,9 @@ EXTRA_DC_FLAGS =
full-distcheck:
make distcheck EXTRA_DC_FLAGS='--enable-html'
make distcheck EXTRA_DC_FLAGS='--disable-i18n'
make distcheck EXTRA_DC_FLAGS='--disable-nls'
make distcheck EXTRA_DC_FLAGS='--without-included-regex'
make distcheck EXTRA_DC_FLAGS='--without-included-gettext'
update-regex:
HOST=sources.redhat.com && \
+2
View File
@@ -3,6 +3,8 @@ Sed 4.1.5
* fix parsing of a negative character class not including a closed bracket,
like [^]] or [^]a-z].
* fix parsing of [ inside an y command, like y/[/A/.
* output the result of commands a, r, R when a q command is found.
----------------------------------------------------------------------------
+3 -3
View File
@@ -1,5 +1,5 @@
/* GNU SED, a batch stream editor.
Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003
Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -1274,12 +1274,12 @@ compile_program(vector)
char *src_buf, *dest_buf;
slash = inchar();
if ( !(b = match_slash(slash, true)) )
if ( !(b = match_slash(slash, false)) )
bad_prog(_(UNTERM_Y_CMD));
src_buf = get_buffer(b);
len = normalize_text(src_buf, size_buffer (b), TEXT_BUFFER);
if ( !(b2 = match_slash(slash, true)) )
if ( !(b2 = match_slash(slash, false)) )
bad_prog(_(UNTERM_Y_CMD));
dest_buf = get_buffer(b2);
dest_len = normalize_text(dest_buf, size_buffer (b2), TEXT_BUFFER);
+1 -2
View File
@@ -1,6 +1,5 @@
/* GNU SED, a batch stream editor.
Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003
Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
+5 -3
View File
@@ -20,8 +20,8 @@ SEDTESTS += \
appquit 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 \
allsub cv-vars classes middle bsd stdin flipcase \
fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
y-newline allsub cv-vars classes middle bsd stdin flipcase \
insens subwrite writeout readin \
help version file quiet \
factor binary3 binary2 binary dc
@@ -80,7 +80,9 @@ EXTRA_DIST = \
xabcx.good xabcx.inp xabcx.sed \
xbxcx.good xbxcx.inp xbxcx.sed \
xbxcx3.good xbxcx3.inp xbxcx3.sed \
xemacs.good xemacs.inp xemacs.sed
xemacs.good xemacs.inp xemacs.sed \
y-bracket.good y-bracket.sed y-bracket.inp \
y-newline.good y-newline.sed y-newline.inp
clean-local:
test x$(srcdir) = x. || rm -f readin.in2 eval.in2
+2 -1
View File
@@ -13,7 +13,8 @@ RM=rm -f
enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo::
appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
y-bracket y-newline::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
< $(srcdir)/$@.inp > $@.out
$(CMP) $(srcdir)/$@.good $@.out
+1
View File
@@ -0,0 +1 @@
Are you sure (y/n)? y]
+1
View File
@@ -0,0 +1 @@
Are you sure (y/n)? [y]
+1
View File
@@ -0,0 +1 @@
y/[/ /
+1
View File
@@ -0,0 +1 @@
Are Sou Yure (S/n)? [S] $$Are Sou Yure (S/n)? [S]
+1
View File
@@ -0,0 +1 @@
Are you sure (y/n)? [y]
+3
View File
@@ -0,0 +1,3 @@
H
G
y/Ss\nYy/yY$sS/