tests/test-eol.t
changeset 14854 23c2d7d25329
parent 13623 0e217d479c16
child 14855 f33579435378
--- a/tests/test-eol.t	Thu Jul 07 10:34:19 2011 +0200
+++ b/tests/test-eol.t	Fri Jul 01 22:53:58 2011 +0400
@@ -441,3 +441,25 @@
   warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
   $ hg status
   ? .hgeol.orig
+
+Test eol.only-consistent can be specified in .hgeol
+
+  $ cd $TESTTMP
+  $ hg init only-consistent
+  $ cd only-consistent
+  $ printf "first\nsecond\r\n" > a.txt
+  $ hg add a.txt
+  $ cat > .hgeol << EOF
+  > [eol]
+  > only-consistent = True
+  > EOF
+  $ hg commit -m 'inconsistent'
+  abort: inconsistent newline style in a.txt
+  
+  [255]
+  $ cat > .hgeol << EOF
+  > [eol]
+  > only-consistent = False
+  > EOF
+  $ hg commit -m 'consistent'
+