tests: unify test-hup
authorMatt Mackall <mpm@selenic.com>
Sun, 26 Sep 2010 13:41:32 -0500
changeset 12413 f8dc83689f19
parent 12412 2dbb9e5e3454
child 12414 858fe1e74785
tests: unify test-hup
tests/test-hup
tests/test-hup.out
tests/test-hup.t
--- a/tests/test-hup	Sun Sep 26 13:41:32 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-"$TESTDIR/hghave" fifo || exit 80
-
-hg init
-mkfifo p
-
-hg serve --stdio < p &
-P=$!
-(echo lock; echo addchangegroup; sleep 5) > p &
-Q=$!
-sleep 3
-kill -HUP $P
-wait
-echo .hg/* .hg/store/*
--- a/tests/test-hup.out	Sun Sep 26 13:41:32 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-0
-0
-adding changesets
-transaction abort!
-rollback completed
-killed!
-.hg/00changelog.i .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hup.t	Sun Sep 26 13:41:32 2010 -0500
@@ -0,0 +1,20 @@
+Test hangup signal in the middle of transaction
+
+  $ "$TESTDIR/hghave" fifo || exit 80
+  $ hg init
+  $ mkfifo p
+  $ hg serve --stdio < p &
+  $ P=$!
+  $ (echo lock; echo addchangegroup; sleep 5) > p &
+  $ Q=$!
+  $ sleep 3
+  0
+  0
+  adding changesets
+  $ kill -HUP $P
+  $ wait
+  transaction abort!
+  rollback completed
+  killed!
+  $ echo .hg/* .hg/store/*
+  .hg/00changelog.i .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a