[PATCH] tests: unify test-diff-newlines

Adrian Buehlmann adrian at cadifra.com
Tue Aug 31 02:46:55 CDT 2010


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1283240629 -7200
# Node ID 97ccbc50faa46dd9d6c78793281d044d1ae8f289
# Parent  c1ed7fee1afdd3b01f961c2dfe31fbf05256cd1f
tests: unify test-diff-newlines

diff --git a/tests/test-diff-newlines.out b/tests/test-diff-newlines.out
deleted file mode 100644
--- a/tests/test-diff-newlines.out
+++ /dev/null
@@ -1,8 +0,0 @@
-adding a
-diff -r 107ba6f817b5 -r 310ce7989cdc a
---- a/a	Thu Jan 01 00:00:01 1970 +0000
-+++ b/a	Thu Jan 01 00:00:02 1970 +0000
-@@ -1,2 +1,3 @@
- confuse str.splitlines
- embedded
newline
-+clean diff
diff --git a/tests/test-diff-newlines b/tests/test-diff-newlines.t
old mode 100755
new mode 100644
rename from tests/test-diff-newlines
rename to tests/test-diff-newlines.t
--- a/tests/test-diff-newlines
+++ b/tests/test-diff-newlines.t
@@ -1,8 +1,18 @@
-#!/bin/sh
+  $ hg init
 
-hg init
-python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
-hg ci -Ama -d '1 0'
-echo clean diff >> a
-hg ci -mb -d '2 0'
-hg diff -r0 -r1
+  $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
+  $ hg ci -Ama -d '1 0'
+  adding a
+
+  $ echo clean diff >> a
+  $ hg ci -mb -d '2 0'
+
+  $ hg diff -r0 -r1
+  diff -r 107ba6f817b5 -r 310ce7989cdc a
+  --- a/a	Thu Jan 01 00:00:01 1970 +0000
+  +++ b/a	Thu Jan 01 00:00:02 1970 +0000
+  @@ -1,2 +1,3 @@
+   confuse str.splitlines
+   embedded
newline
+  +clean diff
+


More information about the Mercurial-devel mailing list