[PATCH 1 of 2] tests: roll test-empty-dir.t into test-empty.t

Adrian Buehlmann adrian at cadifra.com
Mon Jun 4 19:27:43 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1338855597 -7200
# Node ID 7981d2188b8fa3d32364ef5433f9514ca2625198
# Parent  abe7e1155e87fa7a8c33340ae0baa72727aea7c9
tests: roll test-empty-dir.t into test-empty.t

diff --git a/tests/test-empty-dir.t b/tests/test-empty-dir.t
deleted file mode 100644
--- a/tests/test-empty-dir.t
+++ /dev/null
@@ -1,23 +0,0 @@
-  $ hg init
-
-  $ echo 123 > a
-  $ hg add a
-  $ hg commit -m "first" a
-
-  $ mkdir sub
-  $ echo 321 > sub/b
-  $ hg add sub/b
-  $ hg commit -m "second" sub/b
-
-  $ cat sub/b
-  321
-
-  $ hg co 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-  $ cat sub/b 2>/dev/null || echo "sub/b not present"
-  sub/b not present
-
-  $ test -d sub || echo "sub not present"
-  sub not present
-
diff --git a/tests/test-empty.t b/tests/test-empty.t
--- a/tests/test-empty.t
+++ b/tests/test-empty.t
@@ -1,3 +1,6 @@
+  $ mkdir part1
+  $ cd part1
+
 Create an empty repo:
 
   $ hg init a
@@ -51,3 +54,37 @@
 Should be empty:
 
   $ ls .hg/store
+
+  $ cd ..
+  $ cd ..
+  $ pwd
+  $TESTTMP
+
+
+  $ mkdir part2
+  $ cd part2
+
+test empty dir
+
+  $ hg init
+
+  $ echo 123 > a
+  $ hg add a
+  $ hg commit -m "first" a
+
+  $ mkdir sub
+  $ echo 321 > sub/b
+  $ hg add sub/b
+  $ hg commit -m "second" sub/b
+
+  $ cat sub/b
+  321
+
+  $ hg co 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+
+  $ cat sub/b 2>/dev/null || echo "sub/b not present"
+  sub/b not present
+
+  $ test -d sub || echo "sub not present"
+  sub not present


More information about the Mercurial-devel mailing list