[PATCH] tests: unify test-pull-update
Adrian Buehlmann
adrian at cadifra.com
Mon Sep 13 04:38:59 CDT 2010
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1284370399 -7200
# Node ID b9007d40d44cdaa6e28f73427cd244020955c7f5
# Parent 5fa354da3f2ffcd999ca5d824021243174cc8404
tests: unify test-pull-update
diff --git a/tests/test-pull-update.out b/tests/test-pull-update.out
deleted file mode 100644
--- a/tests/test-pull-update.out
+++ /dev/null
@@ -1,32 +0,0 @@
-adding foo
-updating to branch default
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-% should fail
-pulling from ../tt
-searching for changes
-adding changesets
-adding manifests
-adding file changes
-added 1 changesets with 1 changes to 1 files (+1 heads)
-not updating, since new heads added
-(run 'hg heads' to see heads, 'hg merge' to merge)
-% should fail
-pulling from ../t
-searching for changes
-adding changesets
-adding manifests
-adding file changes
-added 1 changesets with 1 changes to 1 files (+1 heads)
-not updating, since new heads added
-(run 'hg heads' to see heads, 'hg merge' to merge)
-merging foo
-0 files updated, 1 files merged, 0 files removed, 0 files unresolved
-(branch merge, don't forget to commit)
-% should work
-pulling from ../tt
-searching for changes
-adding changesets
-adding manifests
-adding file changes
-added 1 changesets with 1 changes to 1 files (-1 heads)
-1 files updated, 0 files merged, 0 files removed, 0 files unresolved
diff --git a/tests/test-pull-update b/tests/test-pull-update.t
old mode 100755
new mode 100644
rename from tests/test-pull-update
rename to tests/test-pull-update.t
--- a/tests/test-pull-update
+++ b/tests/test-pull-update.t
@@ -1,29 +1,63 @@
-#!/bin/sh
-#
+ $ hg init t
+ $ cd t
+ $ echo 1 > foo
+ $ hg ci -Am m
+ adding foo
-hg init t
-cd t
-echo 1 > foo
-hg ci -Am m
+ $ cd ..
+ $ hg clone t tt
+ updating to branch default
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ cd tt
+ $ echo 1.1 > foo
+ $ hg ci -Am m
-cd ..
-hg clone t tt
-cd tt
-echo 1.1 > foo
-hg ci -Am m
+ $ cd ../t
+ $ echo 1.2 > foo
+ $ hg ci -Am m
-cd ../t
-echo 1.2 > foo
-hg ci -Am m
-echo % should fail
-hg pull -u ../tt
+Should not update:
-cd ../tt
-echo % should fail
-hg pull -u ../t
-HGMERGE=true hg merge
-hg ci -mm
+ $ hg pull -u ../tt
+ pulling from ../tt
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ not updating, since new heads added
+ (run 'hg heads' to see heads, 'hg merge' to merge)
-cd ../t
-echo % should work
-hg pull -u ../tt
+ $ cd ../tt
+
+Should not update:
+
+ $ hg pull -u ../t
+ pulling from ../t
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ not updating, since new heads added
+ (run 'hg heads' to see heads, 'hg merge' to merge)
+
+ $ HGMERGE=true hg merge
+ merging foo
+ 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+ (branch merge, don't forget to commit)
+ $ hg ci -mm
+
+ $ cd ../t
+
+Should work:
+
+ $ hg pull -u ../tt
+ pulling from ../tt
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (-1 heads)
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
More information about the Mercurial-devel
mailing list