diff tests/test-grep @ 7240:dac14cc9711e

test 261a9f47b44b: grep w/ match in last line w/o newline Last character in match output omitted to avoid infinite loop.
author Christian Ebert <blacktrash@gmx.net>
date Fri, 24 Oct 2008 08:16:01 +0200
parents 0edea751bbb2
children 6c82beaaa11a
line wrap: on
line diff
--- a/tests/test-grep	Wed Oct 22 21:53:27 2008 +0200
+++ b/tests/test-grep	Fri Oct 24 08:16:01 2008 +0200
@@ -53,6 +53,12 @@
 hg grep orange
 hg grep --all orange
 
+echo % match in last "line" without newline
+python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
+hg ci -Amnoeol
+echo % last character omitted in output to avoid infinite loop
+hg grep loop
+
 # Got a traceback when using grep on a single
 # revision with renamed files.
 cd ..
@@ -66,3 +72,4 @@
 hg grep octarine
 # Used to crash here
 hg grep -r 1 octarine
+