diff tests/test-mq.t @ 12316:4134686b83e1

tests: add exit codes to unified tests
author Matt Mackall <mpm@selenic.com>
date Thu, 16 Sep 2010 17:51:32 -0500
parents 0096f21c01dc
children 22f3353bcc36
line wrap: on
line diff
--- a/tests/test-mq.t	Thu Sep 16 16:12:26 2010 -0500
+++ b/tests/test-mq.t	Thu Sep 16 17:51:32 2010 -0500
@@ -136,6 +136,7 @@
   $ cat .hg/patches/series
   $ hg qinit -c
   abort: repository .* already exists!
+  [255]
   $ cd ..
 
   $ echo '% qinit; <stuff>; qinit -c'
@@ -196,6 +197,7 @@
   $ cd f
   $ hg init --mq
   abort: there is no Mercurial repository here (.hg not found)
+  [255]
   $ cd ..
 
 init --mq with repo path
@@ -209,6 +211,7 @@
 
   $ hg init --mq nonexistentdir
   abort: repository nonexistentdir not found!
+  [255]
 
 
 init --mq with bundle (non "local")
@@ -216,6 +219,7 @@
   $ hg -R a bundle --all a.bundle >/dev/null
   $ hg init --mq a.bundle
   abort: only a local queue repository may be initialized
+  [255]
 
   $ cd a
 
@@ -370,6 +374,7 @@
 
   $ hg qunapp -1
   all patches applied
+  [1]
 
   $ hg qpop
   popping test2.patch
@@ -379,12 +384,14 @@
 
   $ hg commit
   abort: cannot commit over an applied mq patch
+  [255]
 
 push should fail
 
   $ hg push ../../k
   pushing to ../../k
   abort: source has mq patches applied
+  [255]
 
 
 import should fail
@@ -395,6 +402,7 @@
   $ hg revert --no-backup ../a
   $ hg import ../../import.diff
   abort: cannot import over an applied patch
+  [255]
   $ hg st
 
 import --no-commit should succeed
@@ -454,6 +462,7 @@
   $ hg qguard test2.patch -- +posguard
   $ hg qpush --move test2.patch # can't move guarded patch
   cannot push 'test2.patch' - guarded by ['+posguard']
+  [1]
   $ hg qselect posguard
   number of unguarded, unapplied patches has changed from 2 to 3
   $ hg qpush --move test2.patch # move to front
@@ -490,10 +499,13 @@
   now at: test1b.patch
   $ hg qpush --move bogus # nonexistent patch
   abort: patch bogus not in series
+  [255]
   $ hg qpush --move # no patch
   abort: please specify the patch to move
+  [255]
   $ hg qpush --move test.patch # already applied
   abort: cannot push to a previous patch: test.patch
+  [255]
   $ hg qpush
   applying test2.patch
   now at: test2.patch
@@ -520,6 +532,7 @@
 
   $ hg qapplied -1 test.patch
   only one patch applied
+  [1]
 
 qapplied -1 test1b.patch
 
@@ -553,6 +566,7 @@
 
   $ hg qunapplied -1
   all patches applied
+  [1]
 
 qunapplied
 
@@ -582,6 +596,7 @@
 
   $ hg qunapplied -1 test2.patch
   all patches applied
+  [1]
 
 popping -a
 
@@ -598,6 +613,7 @@
 
   $ hg qapplied -1
   no patches applied
+  [1]
   $ hg qpush
   applying test.patch
   now at: test.patch
@@ -760,6 +776,7 @@
   $ hg add y
   $ hg strip tip
   abort: local changes found
+  [255]
 
 --force strip with local changes
 
@@ -835,6 +852,7 @@
   patch failed, unable to continue (try -v)
   patch failed, rejects left in working dir
   errors during apply, please fix and refresh bar
+  [2]
   $ hg st
   ? foo
   ? foo.rej
@@ -865,6 +883,7 @@
   default                        0:cb9a9f314b8b
   $ hg qpop
   no patches applied
+  [1]
 
   $ cat >>$HGRCPATH <<EOF
   > [diff]
@@ -1064,6 +1083,7 @@
   popping addbucephalus
   now at: addalexander
   $ test -f bucephalus && echo % bucephalus should not be there
+  [1]
   $ hg qpush
   applying addbucephalus
   now at: addbucephalus
@@ -1162,6 +1182,7 @@
 
   $ hg qclone qclonesource failure
   abort: versioned patch repository not found (see init --mq)
+  [255]
 
   $ cd qclonesource
   $ hg qinit -c
@@ -1254,6 +1275,7 @@
 
   $ hg qpush
   abort: local changes found, refresh first
+  [255]
 
 
 apply force, should not discard changes with empty patch
@@ -1299,6 +1321,7 @@
 
   $ hg qpush
   abort: local changes found, refresh first
+  [255]
 
 
 apply force, should discard changes in hello, but not bye