changeset 11982:56d9b73487ff

tests: unify test-merge9
author Pradeepkumar Gayam <in3xes@gmail.com>
date Wed, 18 Aug 2010 06:02:08 +0530
parents 518b90d66fad
children 27649cf258e3
files tests/test-merge9 tests/test-merge9.out tests/test-merge9.t
diffstat 3 files changed, 90 insertions(+), 100 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-merge9	Wed Aug 18 05:55:56 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# test that we don't interrupt the merge session if
-# a file-level merge failed
-
-hg init repo
-cd repo
-
-echo foo > foo
-echo a > bar
-hg ci -Am 'add foo'
-
-hg mv foo baz
-echo b >> bar
-echo quux > quux1
-hg ci -Am 'mv foo baz'
-
-hg up -qC 0
-echo >> foo
-echo c >> bar
-echo quux > quux2
-hg ci -Am 'change foo'
-
-# test with the rename on the remote side
-HGMERGE=false hg merge
-hg resolve -l
-
-# test with the rename on the local side
-hg up -C 1
-HGMERGE=false hg merge
-
-echo % show unresolved
-hg resolve -l
-
-echo % unmark baz
-hg resolve -u baz
-
-echo % show
-hg resolve -l
-hg st
-
-echo % re-resolve baz
-hg resolve baz
-
-echo % after
-hg resolve -l
-
-echo % resolve all warning
-hg resolve
-
-echo % resolve all
-hg resolve -a
-
-echo % after
-hg resolve -l
-
-true
--- a/tests/test-merge9.out	Wed Aug 18 05:55:56 2010 +0530
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-adding bar
-adding foo
-adding quux1
-adding quux2
-created new head
-merging bar
-merging bar failed!
-merging foo and baz to baz
-1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
-U bar
-R baz
-3 files updated, 0 files merged, 1 files removed, 0 files unresolved
-merging bar
-merging bar failed!
-merging baz and foo to baz
-1 files updated, 1 files merged, 0 files removed, 1 files unresolved
-use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
-% show unresolved
-U bar
-R baz
-% unmark baz
-% show
-U bar
-U baz
-M bar
-M baz
-M quux2
-? bar.orig
-% re-resolve baz
-merging baz and foo to baz
-% after
-U bar
-R baz
-% resolve all warning
-abort: no files or directories specified; use --all to remerge all files
-% resolve all
-merging bar
-warning: conflicts during merge.
-merging bar failed!
-% after
-U bar
-R baz
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-merge9.t	Wed Aug 18 06:02:08 2010 +0530
@@ -0,0 +1,90 @@
+test that we don't interrupt the merge session if
+a file-level merge failed
+
+  $ hg init repo
+  $ cd repo
+
+  $ echo foo > foo
+  $ echo a > bar
+  $ hg ci -Am 'add foo'
+  adding bar
+  adding foo
+
+  $ hg mv foo baz
+  $ echo b >> bar
+  $ echo quux > quux1
+  $ hg ci -Am 'mv foo baz'
+  adding quux1
+
+  $ hg up -qC 0
+  $ echo >> foo
+  $ echo c >> bar
+  $ echo quux > quux2
+  $ hg ci -Am 'change foo'
+  adding quux2
+  created new head
+
+test with the rename on the remote side
+  $ HGMERGE=false hg merge
+  merging bar
+  merging bar failed!
+  merging foo and baz to baz
+  1 files updated, 1 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
+  $ hg resolve -l
+  U bar
+  R baz
+
+test with the rename on the local side
+  $ hg up -C 1
+  3 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ HGMERGE=false hg merge
+  merging bar
+  merging bar failed!
+  merging baz and foo to baz
+  1 files updated, 1 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg update -C' to abandon
+
+show unresolved
+  $ hg resolve -l
+  U bar
+  R baz
+
+unmark baz
+  $ hg resolve -u baz
+
+show
+  $ hg resolve -l
+  U bar
+  U baz
+  $ hg st
+  M bar
+  M baz
+  M quux2
+  ? bar.orig
+
+re-resolve baz
+  $ hg resolve baz
+  merging baz and foo to baz
+
+after resolve
+  $ hg resolve -l
+  U bar
+  R baz
+
+resolve all warning
+  $ hg resolve
+  abort: no files or directories specified; use --all to remerge all files
+
+resolve all
+  $ hg resolve -a
+  merging bar
+  warning: conflicts during merge.
+  merging bar failed!
+
+after
+  $ hg resolve -l
+  U bar
+  R baz
+
+  $ true