diff tests/test-walk.t @ 14248:25c68ac247c1

match: make 'listfile:' split on LF and CRLF We want util.readfile() to operate in binary mode, so EOLs have to be handled correctly depending on the platform. It seems both easier and more convenient to treat LF and CRLF the same way on all platforms.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 07 May 2011 21:12:30 +0200
parents 8b252e826c68
children e1f05d7a8c7b
line wrap: on
line diff
--- a/tests/test-walk.t	Sat May 07 17:25:12 2011 +0200
+++ b/tests/test-walk.t	Sat May 07 21:12:30 2011 +0200
@@ -295,6 +295,18 @@
   $ hg debugwalk ignored/file
   f  ignored/file  ignored/file  exact
 
+Test listfile and listfile0
+
+  $ python -c "file('../listfile0', 'wb').write('fenugreek\0new\0')"
+  $ hg debugwalk -I 'listfile0:../listfile0'
+  f  fenugreek  fenugreek
+  f  new        new
+  $ python -c "file('../listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
+  $ hg debugwalk -I 'listfile:../listfile'
+  f  fenugreek      fenugreek
+  f  mammals/skunk  mammals/skunk
+  f  new            new
+
   $ cd ..
   $ hg debugwalk -R t t/mammals/skunk
   f  mammals/skunk  t/mammals/skunk  exact