fix a/r/R commands when q is encountered

2005-02-10  Paolo Bonzini  <bonzini@gnu.org>

	* testsuite/appquit.good, testsuite/appquit.inp,
	testsuite/appquit.sed: New testcase.
	* testsuite/readin.sed: Quit after the last r command.
	* testsuite/readin.good: Adjust.
	* sed/execute.c (execute_program): Dump the results of the
	a/r/R commands just before quitting.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-44
This commit is contained in:
Paolo Bonzini committed 2008-01-09 16:11:49 +01:00
1 parent 20a67b75e7
commit 479184e226
10 files changed
+26 -4

No files matched your search

+9
View File
@@ -1,3 +1,12 @@
2005-02-10 Paolo Bonzini <bonzini@gnu.org>
* testsuite/appquit.good, testsuite/appquit.inp,
testsuite/appquit.sed: New testcase.
* testsuite/readin.sed: Quit after the last r command.
* testsuite/readin.good: Adjust.
* sed/execute.c (execute_program): Dump the results of the
a/r/R commands just before quitting.
2005-02-10 Paolo Bonzini <bonzini@gnu.org>
* sed/regexp.c: Fix off-by-one error in the "invalid reference
+5
View File
@@ -1,3 +1,8 @@
Sed 4.1.5
* output the result of commands a, r, R when a q command is found.
----------------------------------------------------------------------------
Sed 4.1.4
* \B correctly means "not on a word boundary" rather than "inside a word"
+1
View File
@@ -1466,6 +1466,7 @@ execute_program(vec, input)
case 'q':
if (!no_default_output)
output_line(line.active, line.length, line.chomped, &output_file);
dump_append_queue();
case 'Q':
return cur_cmd->x.int_arg == -1 ? 0 : cur_cmd->x.int_arg;
+2 -1
View File
@@ -17,7 +17,7 @@ SEDTESTS += space
endif
SEDTESTS += \
enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
appquit enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
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 \
@@ -35,6 +35,7 @@ EXTRA_DIST = \
8bit.good 8bit.inp 8bit.sed \
8to7.good 8to7.inp 8to7.sed \
allsub.good allsub.inp allsub.sed \
appquit.good appquit.inp appquit.sed \
binary.good binary.inp binary.sed binary2.sed binary3.sed \
bkslashes.good bkslashes.inp bkslashes.sed \
bsd.good bsd.sh \
+1 -1
View File
@@ -13,7 +13,7 @@ RM=rm -f
enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
fasts uniq manis linecnt khadafy allsub flipcase space::
appquit fasts uniq manis linecnt khadafy allsub flipcase space::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
< $(srcdir)/$@.inp > $@.out
$(CMP) $(srcdir)/$@.good $@.out
+2
View File
@@ -0,0 +1,2 @@
doh
ok
+1
View File
@@ -0,0 +1 @@
doh
+4
View File
@@ -0,0 +1,4 @@
# Test appending quit
a\
ok
q
-2
View File
@@ -17,5 +17,3 @@ MOO
MOO
I live here, too.
MOO
I want freedom just as you.''
``The Weary Blues'', Langston Hughes
+1
View File
@@ -1 +1,2 @@
/\.$/r readin.in2
/too\.$/q