summaryrefslogtreecommitdiff
path: root/tests/test-win32text.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-win32text.t')
-rw-r--r--tests/test-win32text.t64
1 files changed, 42 insertions, 22 deletions
diff --git a/tests/test-win32text.t b/tests/test-win32text.t
index edbe842..386b6f3 100644
--- a/tests/test-win32text.t
+++ b/tests/test-win32text.t
@@ -16,14 +16,16 @@
[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
-
+ $ echo
+
$ echo hello > f
$ hg add f
commit should succeed
$ hg ci -m 1
-
+ $ echo
+
$ hg clone . ../zoz
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -33,13 +35,14 @@ commit should succeed
commit should fail
$ hg ci -m 2.1
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in f583ea08d42a: f
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
[255]
-
+ $ echo
+
$ mv .hg/hgrc .hg/hgrc.bak
commits should succeed
@@ -47,6 +50,8 @@ commits should succeed
$ hg ci -m 2
$ hg cp f g
$ hg ci -m 2.2
+ $ echo
+
push should fail
@@ -57,7 +62,7 @@ push should fail
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in bc2d09796734: g
in b1aa5cde7ff4: f
@@ -79,7 +84,8 @@ push should fail
rollback completed
abort: pretxnchangegroup.crlf hook failed
[255]
-
+ $ echo
+
$ mv .hg/hgrc.bak .hg/hgrc
$ echo hello > f
$ hg rm g
@@ -87,6 +93,8 @@ push should fail
commit should succeed
$ hg ci -m 2.3
+ $ echo
+
push should succeed
@@ -97,6 +105,8 @@ push should succeed
adding manifests
adding file changes
added 3 changesets with 3 changes to 2 files
+ $ echo
+
and now for something completely different
@@ -105,19 +115,21 @@ and now for something completely different
$ python unix2dos.py d/f2
$ hg add d/f2
$ hg ci -m 3
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in 053ba1a3035a: d/f2
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
[255]
$ hg revert -a
- forgetting d/f2 (glob)
+ forgetting d/f2
$ rm d/f2
-
+ $ echo
+
$ hg rem f
$ hg ci -m 4
-
+ $ echo
+
$ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")'
$ hg add bin
$ hg ci -m 5
@@ -171,16 +183,19 @@ and now for something completely different
1
+ $ echo
+
$ hg clone . dupe
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
+ $ echo
+
$ for x in a b c d; do echo content > dupe/$x; done
$ hg -R dupe add
- adding dupe/a (glob)
- adding dupe/b (glob)
- adding dupe/c (glob)
- adding dupe/d (glob)
+ adding dupe/a
+ adding dupe/b
+ adding dupe/c
+ adding dupe/d
$ python unix2dos.py dupe/b dupe/c dupe/d
$ hg -R dupe ci -m a dupe/a
$ hg -R dupe ci -m b/c dupe/[bc]
@@ -259,6 +274,8 @@ and now for something completely different
1
+ $ echo
+
$ hg pull dupe
pulling from dupe
searching for changes
@@ -266,7 +283,7 @@ and now for something completely different
adding manifests
adding file changes
added 3 changesets with 4 changes to 4 files
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in 67ac5962ab43: d
in 68c127d1834e: b
in 68c127d1834e: c
@@ -289,7 +306,8 @@ and now for something completely different
rollback completed
abort: pretxnchangegroup.crlf hook failed
[255]
-
+ $ echo
+
$ hg log -v
changeset: 5:f0b1c8d75fce
tag: tip
@@ -340,6 +358,8 @@ and now for something completely different
1
+ $ echo
+
$ rm .hg/hgrc
$ (echo some; echo text) > f3
$ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")'
@@ -352,7 +372,8 @@ and now for something completely different
text
$ cat f4.bat
rem empty\r (esc)
-
+ $ echo
+
$ echo '[extensions]' >> .hg/hgrc
$ echo 'win32text = ' >> .hg/hgrc
$ echo '[decode]' >> .hg/hgrc
@@ -385,7 +406,7 @@ Disable warning:
WARNING: f4.bat already has CRLF line endings
and does not need EOL conversion by the win32text plugin.
Before your next commit, please reconsider your encode/decode settings in
- Mercurial.ini or $TESTTMP/t/.hg/hgrc. (glob)
+ Mercurial.ini or $TESTTMP/t/.hg/hgrc.
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat bin
hello\x00\r (esc)
@@ -394,7 +415,8 @@ Disable warning:
text\r (esc)
$ cat f4.bat
rem empty\r (esc)
-
+ $ echo
+
$ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")'
$ hg add f5.sh
$ hg ci -m 7
@@ -422,5 +444,3 @@ Disable warning:
$ hg st -q
$ cat linefeed
% just linefeed\r (esc)
-
- $ cd ..