[PATCH] tests: unify test-merge-types

Adrian Buehlmann adrian at cadifra.com
Sun Sep 12 08:11:47 CDT 2010


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1284296819 -7200
# Node ID b0d9a8db56fa74c170f43d7ff970a5d72d9e1ff8
# Parent  62a15cd75b99757a8fec36b7b78d2e5bc7261bf9
tests: unify test-merge-types

diff --git a/tests/test-merge-types.out b/tests/test-merge-types.out
deleted file mode 100644
--- a/tests/test-merge-types.out
+++ /dev/null
@@ -1,29 +0,0 @@
-adding a
-0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-created new head
-  searching for copies back to rev 1
-resolving manifests
- overwrite None partial False
- ancestor c334dc3be0da local 521a1e40188f+ remote 3574f3e69b1c
- conflicting flags for a
-(n)one, e(x)ec or sym(l)ink? n
- a: update permissions -> e
-updating: a 1/1 files (100.00%)
-0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-% symlink is local parent, executable is other
-a has no flags (default for conflicts)
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  searching for copies back to rev 1
-resolving manifests
- overwrite None partial False
- ancestor c334dc3be0da local 3574f3e69b1c+ remote 521a1e40188f
- conflicting flags for a
-(n)one, e(x)ec or sym(l)ink? n
- a: remote is newer -> g
-updating: a 1/1 files (100.00%)
-getting a
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-% symlink is other parent, executable is local
-a has no flags (default for conflicts)
diff --git a/tests/test-merge-types b/tests/test-merge-types.t
old mode 100755
new mode 100644
rename from tests/test-merge-types
rename to tests/test-merge-types.t
--- a/tests/test-merge-types
+++ b/tests/test-merge-types.t
@@ -1,39 +1,70 @@
-#!/bin/sh
+  $ hg init
 
-hg init
-echo a > a
-hg ci -Amadd       # 0
+  $ echo a > a
+  $ hg ci -Amadd
+  adding a
 
-chmod +x a
-hg ci -mexecutable # 1
+  $ chmod +x a
+  $ hg ci -mexecutable
 
-hg up 0
-rm a
-ln -s symlink a
-hg ci -msymlink    # 2
-hg merge --debug
+  $ hg up 0
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ rm a
+  $ ln -s symlink a
+  $ hg ci -msymlink
+  created new head
 
-echo % symlink is local parent, executable is other
+  $ hg merge --debug
+    searching for copies back to rev 1
+  resolving manifests
+   overwrite None partial False
+   ancestor c334dc3be0da local 521a1e40188f+ remote 3574f3e69b1c
+   conflicting flags for a
+  (n)one, e(x)ec or sym(l)ink? n
+   a: update permissions -> e
+  updating: a 1/1 files (100.00%)
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
 
-if [ -h a ]; then
-    echo a is a symlink
-    $TESTDIR/readlink.py a
-elif [ -x a ]; then
-    echo a is executable
-else
-    echo "a has no flags (default for conflicts)"
-fi
 
-hg update -C 1
-hg merge --debug
+Symlink is local parent, executable is other:
 
-echo % symlink is other parent, executable is local
+  $ if [ -h a ]; then
+  >     echo a is a symlink
+  >     $TESTDIR/readlink.py a
+  > elif [ -x a ]; then
+  >     echo a is executable
+  > else
+  >     echo "a has no flags (default for conflicts)"
+  > fi
+  a has no flags (default for conflicts)
 
-if [ -h a ]; then
-    echo a is a symlink
-    $TESTDIR/readlink.py a
-elif [ -x a ]; then
-    echo a is executable
-else
-    echo "a has no flags (default for conflicts)"
-fi
+  $ hg update -C 1
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg merge --debug
+    searching for copies back to rev 1
+  resolving manifests
+   overwrite None partial False
+   ancestor c334dc3be0da local 3574f3e69b1c+ remote 521a1e40188f
+   conflicting flags for a
+  (n)one, e(x)ec or sym(l)ink? n
+   a: remote is newer -> g
+  updating: a 1/1 files (100.00%)
+  getting a
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+
+Symlink is other parent, executable is local:
+
+  $ if [ -h a ]; then
+  >    echo a is a symlink
+  >    $TESTDIR/readlink.py a
+  > elif [ -x a ]; then
+  >     echo a is executable
+  > else
+  >     echo "a has no flags (default for conflicts)"
+  > fi
+  a has no flags (default for conflicts)
+


More information about the Mercurial-devel mailing list