changeset 12137:e1814ff260c2

tests: unify test-diff-hashes
author Adrian Buehlmann <adrian@cadifra.com>
date Mon, 30 Aug 2010 16:52:21 +0200
parents 30b5e83004e0
children aff0b3947020
files tests/test-diff-change.t tests/test-diff-hashes tests/test-diff-hashes.out tests/test-diff-hashes.t
diffstat 3 files changed, 45 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-diff-hashes	Mon Aug 30 14:38:15 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-hg init a
-cd a
-hg diff not found
-echo bar > foo
-hg add foo
-hg ci -m 'add foo' -d '1000000 0'
-
-echo foobar > foo
-hg ci -m 'change foo' -d '1000001 0'
-
-echo 'quiet:'
-hg --quiet diff -r 0 -r 1
-echo
-
-echo 'normal:'
-hg diff -r 0 -r 1
-echo
-
-echo 'verbose:'
-hg --verbose diff -r 0 -r 1
-echo
-
-echo 'debug:'
-hg --debug diff -r 0 -r 1
-echo
--- a/tests/test-diff-hashes.out	Mon Aug 30 14:38:15 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-found: No such file or directory
-not: No such file or directory
-quiet:
---- a/foo	Mon Jan 12 13:46:40 1970 +0000
-+++ b/foo	Mon Jan 12 13:46:41 1970 +0000
-@@ -1,1 +1,1 @@
--bar
-+foobar
-
-normal:
-diff -r 74de3f1392e2 -r b8b5f023a6ad foo
---- a/foo	Mon Jan 12 13:46:40 1970 +0000
-+++ b/foo	Mon Jan 12 13:46:41 1970 +0000
-@@ -1,1 +1,1 @@
--bar
-+foobar
-
-verbose:
-diff -r 74de3f1392e2 -r b8b5f023a6ad foo
---- a/foo	Mon Jan 12 13:46:40 1970 +0000
-+++ b/foo	Mon Jan 12 13:46:41 1970 +0000
-@@ -1,1 +1,1 @@
--bar
-+foobar
-
-debug:
-diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo
---- a/foo	Mon Jan 12 13:46:40 1970 +0000
-+++ b/foo	Mon Jan 12 13:46:41 1970 +0000
-@@ -1,1 +1,1 @@
--bar
-+foobar
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-diff-hashes.t	Mon Aug 30 16:52:21 2010 +0200
@@ -0,0 +1,45 @@
+  $ hg init a
+  $ cd a
+
+  $ hg diff inexistent1 inexistent2
+  inexistent1: No such file or directory
+  inexistent2: No such file or directory
+
+  $ echo bar > foo
+  $ hg add foo
+  $ hg ci -m 'add foo' -d '1000000 0'
+
+  $ echo foobar > foo
+  $ hg ci -m 'change foo' -d '1000001 0'
+
+  $ hg --quiet diff -r 0 -r 1
+  --- a/foo	Mon Jan 12 13:46:40 1970 +0000
+  +++ b/foo	Mon Jan 12 13:46:41 1970 +0000
+  @@ -1,1 +1,1 @@
+  -bar
+  +foobar
+
+  $ hg diff -r 0 -r 1
+  diff -r 74de3f1392e2 -r b8b5f023a6ad foo
+  --- a/foo	Mon Jan 12 13:46:40 1970 +0000
+  +++ b/foo	Mon Jan 12 13:46:41 1970 +0000
+  @@ -1,1 +1,1 @@
+  -bar
+  +foobar
+
+  $ hg --verbose diff -r 0 -r 1
+  diff -r 74de3f1392e2 -r b8b5f023a6ad foo
+  --- a/foo	Mon Jan 12 13:46:40 1970 +0000
+  +++ b/foo	Mon Jan 12 13:46:41 1970 +0000
+  @@ -1,1 +1,1 @@
+  -bar
+  +foobar
+
+  $ hg --debug diff -r 0 -r 1
+  diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo
+  --- a/foo	Mon Jan 12 13:46:40 1970 +0000
+  +++ b/foo	Mon Jan 12 13:46:41 1970 +0000
+  @@ -1,1 +1,1 @@
+  -bar
+  +foobar
+