tests/test-eol-hook.t
branchstable
changeset 13501 50b825c1adb1
parent 12423 10c3385fa89e
child 13519 43b3b761d9d1
--- a/tests/test-eol-hook.t	Sun Feb 27 15:58:29 2011 -0600
+++ b/tests/test-eol-hook.t	Sun Feb 27 19:50:28 2011 +0100
@@ -21,6 +21,7 @@
   $ cat > .hgeol <<EOF
   > [patterns]
   > mixed.txt = BIN
+  > crlf.txt = CRLF
   > **.txt = native
   > EOF
   $ hg add .hgeol
@@ -61,3 +62,29 @@
   adding manifests
   adding file changes
   added 2 changesets with 2 changes to 1 files
+
+  $ printf "first\nsecond\nthird\n" > crlf.txt
+  $ hg add crlf.txt
+  $ hg commit -m 'LF crlf.txt'
+  $ hg push ../main
+  pushing to ../main
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  error: pretxnchangegroup hook failed: crlf.txt should not have LF line endings
+  transaction abort!
+  rollback completed
+  abort: crlf.txt should not have LF line endings
+  [255]
+
+  $ printf "first\r\nsecond\r\nthird\r\n" > crlf.txt
+  $ hg commit -m 'CRLF crlf.txt (fixed)'
+  $ hg push ../main
+  pushing to ../main
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 1 files