# HG changeset patch
# User Nicolas Dumazet <nicdumz.commits@gmail.com>
# Date 1281619701 -32400
#      Thu Aug 12 22:28:21 2010 +0900
# Node ID 6c24465613de27dc92557308c239430be3a5bbb5
# Parent  b90199179eb53a23cf2ff7da760d060cc66ea780
tests: unify test-commit-unresolved

diff --git a/tests/test-commit-unresolved.out b/tests/test-commit-unresolved.out
deleted file mode 100644
--- a/tests/test-commit-unresolved.out
+++ /dev/null
@@ -1,14 +0,0 @@
-1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-created new head
-
-% Merging a conflict araises
-merging A
-warning: conflicts during merge.
-merging A failed!
-1 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
-
-% Correct the conflict without marking the file as resolved
-abort: unresolved merge conflicts (see hg resolve)
-
-% Mark the conflict as resolved and commit
diff --git a/tests/test-commit-unresolved b/tests/test-commit-unresolved.t
old mode 100755
new mode 100644
rename from tests/test-commit-unresolved
rename to tests/test-commit-unresolved.t
--- a/tests/test-commit-unresolved
+++ b/tests/test-commit-unresolved.t
@@ -1,41 +1,47 @@
-#!/bin/sh
+  $ echo "[extensions]" >> $HGRCPATH
+  $ echo "graphlog=" >> $HGRCPATH
 
-echo "[extensions]" >> $HGRCPATH
-echo "graphlog=" >> $HGRCPATH
+  $ addcommit () {
+  >     echo $1 > $1
+  >     hg add $1
+  >     hg commit -d "${2} 0" -m $1
+  > }
 
-addcommit () {
-    echo $1 > $1
-    hg add $1
-    hg commit -d "${2} 0" -m $1
-}
+  $ commit () {
+  >     hg commit -d "${2} 0" -m $1
+  > }
 
-commit () {
-    hg commit -d "${2} 0" -m $1
-}
+  $ hg init a
+  $ cd a
+  $ addcommit "A" 0
+  $ addcommit "B" 1
+  $ echo "C" >> A
+  $ commit "C" 2
 
-hg init a
-cd a
-addcommit "A" 0
-addcommit "B" 1
-echo "C" >> A
-commit "C" 2
+  $ hg update -C 0
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo "D" >> A
+  $ commit "D" 3
+  created new head
 
-hg update -C 0
-echo "D" >> A
-commit "D" 3
+Merging a conflict araises
 
-echo
-echo "% Merging a conflict araises"
-hg merge
+  $ hg merge
+  merging A
+  warning: conflicts during merge.
+  merging A failed!
+  1 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
+
+Correct the conflict without marking the file as resolved
 
-echo
-echo "% Correct the conflict without marking the file as resolved"
-echo "ABCD" > A
-hg commit -m "Merged"
+  $ echo "ABCD" > A
+  $ hg commit -m "Merged"
+  abort: unresolved merge conflicts (see hg resolve)
 
-echo
-echo "% Mark the conflict as resolved and commit"
-hg resolve -m A
-hg commit -m "Merged"
+Mark the conflict as resolved and commit
 
-exit 0
+  $ hg resolve -m A
+  $ hg commit -m "Merged"
+
+  $ exit 0