tests: unify test-resolve
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Mon, 30 Aug 2010 14:06:18 +0900
changeset 12117 a40372c1c731
parent 12116 f51858009328
child 12118 ab2ccdce985d
tests: unify test-resolve
tests/test-bisect.t
tests/test-churn.t
tests/test-inherit-mode.t
tests/test-relink.t
tests/test-remove-new.t
tests/test-remove.t
tests/test-rename-dir-merge.t
tests/test-rename.t
tests/test-requires.t
tests/test-resolve
tests/test-resolve.out
tests/test-resolve.t
tests/test-revert-flags.t
tests/test-revert-unknown.t
tests/test-revert.t
tests/test-revset.t
tests/test-strict.t
--- a/tests/test-resolve	Mon Aug 30 14:04:38 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# test that a commit clears the merge state.
-
-hg init repo
-cd repo
-
-echo foo > file
-hg commit -Am 'add file'
-
-echo bar >> file
-hg commit -Am 'append bar'
-
-echo % create a second head
-hg up -C 0
-echo baz >> file
-hg commit -Am 'append baz'
-
-echo % failing merge
-HGMERGE=internal:fail hg merge
-
-echo resolved > file
-hg resolve -m file
-hg commit -m 'resolved'
-
-echo % resolve -l, should be empty
-hg resolve -l
-
-# test crashed merge with empty mergestate
-mkdir .hg/merge
-touch .hg/merge/state
-echo % resolve -l, should be empty
-hg resolve -l
--- a/tests/test-resolve.out	Mon Aug 30 14:04:38 2010 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-adding file
-% create a second head
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-created new head
-% failing merge
-0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
-% resolve -l, should be empty
-% resolve -l, should be empty
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-resolve.t	Mon Aug 30 14:06:18 2010 +0900
@@ -0,0 +1,43 @@
+test that a commit clears the merge state.
+
+  $ hg init repo
+  $ cd repo
+
+  $ echo foo > file
+  $ hg commit -Am 'add file'
+  adding file
+
+  $ echo bar >> file
+  $ hg commit -Am 'append bar'
+
+
+create a second head
+
+  $ hg up -C 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo baz >> file
+  $ hg commit -Am 'append baz'
+  created new head
+
+failing merge
+
+  $ HGMERGE=internal:fail hg merge
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
+
+  $ echo resolved > file
+  $ hg resolve -m file
+  $ hg commit -m 'resolved'
+
+resolve -l, should be empty
+
+  $ hg resolve -l
+
+test crashed merge with empty mergestate
+
+  $ mkdir .hg/merge
+  $ touch .hg/merge/state
+
+resolve -l, should be empty
+
+  $ hg resolve -l