diff options
Diffstat (limited to 'tests/test-eol.t')
-rw-r--r-- | tests/test-eol.t | 89 |
1 files changed, 2 insertions, 87 deletions
diff --git a/tests/test-eol.t b/tests/test-eol.t index 2b8f585..b204759 100644 --- a/tests/test-eol.t +++ b/tests/test-eol.t @@ -384,13 +384,10 @@ Mixed tests % hg status $ rm -r mixed - $ echo '[extensions]' >> $HGRCPATH - $ echo 'eol =' >> $HGRCPATH - -#if unix-permissions - Test issue2569 -- eol extension takes write lock on reading: + $ echo '[extensions]' >> $HGRCPATH + $ echo 'eol =' >> $HGRCPATH $ hg init repo $ cd repo $ touch .hgeol @@ -404,8 +401,6 @@ Test issue2569 -- eol extension takes write lock on reading: $ chmod -R u+w .hg $ cd .. -#endif - Test cleverencode: and cleverdecode: aliases for win32text extension $ echo '[encode]' >> $HGRCPATH @@ -446,83 +441,3 @@ Test handling of a broken .hgeol file: 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' - - -Test trailing newline - - $ cat >> $HGRCPATH <<EOF - > [extensions] - > eol= - > EOF - -setup repository - - $ cd $TESTTMP - $ hg init trailing - $ cd trailing - $ cat > .hgeol <<EOF - > [patterns] - > **.txt = native - > [eol] - > fix-trailing-newline = False - > EOF - -add text without trailing newline - - $ printf "first\nsecond" > a.txt - $ hg commit --addremove -m 'checking in' - adding .hgeol - adding a.txt - $ rm a.txt - $ hg update -C -q - $ cat a.txt - first - second (no-eol) - - $ cat > .hgeol <<EOF - > [patterns] - > **.txt = native - > [eol] - > fix-trailing-newline = True - > EOF - $ printf "third\nfourth" > a.txt - $ hg commit -m 'checking in with newline fix' - $ rm a.txt - $ hg update -C -q - $ cat a.txt - third - fourth - -append a line without trailing newline - - $ printf "fifth" >> a.txt - $ hg commit -m 'adding another line line' - $ rm a.txt - $ hg update -C -q - $ cat a.txt - third - fourth - fifth - - $ cd .. |