eol: test win32text compatible encode/decode filters stable
authorMartin Geisler <mg@aragost.com>
Mon, 28 Feb 2011 11:31:36 +0100
branchstable
changeset 13503 5007ff32f356
parent 13502 c0f252757b41
child 13504 85840c4ae2ad
eol: test win32text compatible encode/decode filters
tests/test-eol.t
--- a/tests/test-eol.t	Mon Feb 28 09:28:18 2011 +0100
+++ b/tests/test-eol.t	Mon Feb 28 11:31:36 2011 +0100
@@ -398,3 +398,31 @@
   $ touch .hgeol
   $ hg status --traceback
   ? .hgeol
+  $ cd ..
+
+Test cleverencode: and cleverdecode: aliases for win32text extension
+
+  $ echo '[encode]' >> $HGRCPATH
+  $ echo '**.txt = cleverencode: =' >> $HGRCPATH
+  $ echo '[decode]' >> $HGRCPATH
+  $ echo '**.txt = cleverdecode: =' >> $HGRCPATH
+
+  $ hg init win32compat
+  $ cd win32compat
+  $ printf "foo\r\nbar\r\nbaz\r\n" > win.txt
+  $ printf "foo\nbar\nbaz\n" > unix.txt
+  $ hg add
+  adding unix.txt
+  adding win.txt
+  $ hg commit -m checkin
+
+Check that both files have LF line-endings in the repository:
+
+  $ hg cat win.txt
+  foo
+  bar
+  baz
+  $ hg cat unix.txt
+  foo
+  bar
+  baz