[PATCH] testing on Windows: Split test into generic one and conflict-checking non-Windows version

Ilya Ryzhenkov Ilya.Ryzhenkov at jetbrains.com
Mon Jan 9 17:02:50 CST 2012


# HG changeset patch
# User orangy
# Date 1326149661 -14400
# Node ID 034e77a944c56a28ba5feb294fc4cfd3424bb762
# Parent  9b9b05cbdba09dfc96c98d1c3884ba68df2bedb3
Split test into generic one and conflict-checking non-Windows version

Basic addremove testing is missing on Windows, because one test does all the testing, 
including testing for potential conflict with Windows names like Con. Split into two 
tests, one of which is no-windows

diff -r 9b9b05cbdba0 -r 034e77a944c5 tests/test-addremove-conflict.t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-addremove-conflict.t	Tue Jan 10 02:54:21 2012 +0400
@@ -0,0 +1,52 @@
+  $ "$TESTDIR/hghave" no-windows || exit 80
+
+  $ hg init rep
+  $ cd rep
+  $ mkdir dir
+  $ touch foo dir/bar
+  $ hg -v addremove
+  adding dir/bar
+  adding foo
+  $ hg -v commit -m "add 1"
+  dir/bar
+  foo
+  committed changeset 0:6f7f953567a2
+  $ cd dir/
+  $ touch ../foo_2 bar_2 con.xml
+  $ hg -v addremove
+  adding dir/bar_2
+  adding dir/con.xml
+  adding foo_2
+  warning: filename contains 'con', which is reserved on Windows: 'dir/con.xml'
+  $ hg -v commit -m "add 2"
+  dir/bar_2
+  dir/con.xml
+  foo_2
+  committed changeset 1:6bb597da00f1
+
+  $ cd ..
+  $ hg init sim
+  $ cd sim
+  $ echo a > a
+  $ echo a >> a
+  $ echo a >> a
+  $ echo c > c
+  $ hg commit -Ama
+  adding a
+  adding c
+  $ mv a b
+  $ rm c
+  $ echo d > d
+  $ hg addremove -n -s 50 # issue 1696
+  removing a
+  adding b
+  removing c
+  adding d
+  recording removal of a as rename to b (100% similar)
+  $ hg addremove -s 50
+  removing a
+  adding b
+  removing c
+  adding d
+  recording removal of a as rename to b (100% similar)
+  $ hg commit -mb
diff -r 9b9b05cbdba0 -r 034e77a944c5 tests/test-addremove.t
--- a/tests/test-addremove.t	Mon Jan 09 21:44:55 2012 +0400
+++ b/tests/test-addremove.t	Tue Jan 10 02:54:21 2012 +0400
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" no-windows || exit 80
-
   $ hg init rep
   $ cd rep
   $ mkdir dir
@@ -12,17 +10,14 @@
   foo
   committed changeset 0:6f7f953567a2
   $ cd dir/
-  $ touch ../foo_2 bar_2 con.xml
+  $ touch ../foo_2 bar_2 
   $ hg -v addremove
   adding dir/bar_2
-  adding dir/con.xml
   adding foo_2
-  warning: filename contains 'con', which is reserved on Windows: 'dir/con.xml'
   $ hg -v commit -m "add 2"
   dir/bar_2
-  dir/con.xml
   foo_2
-  committed changeset 1:6bb597da00f1
+  committed changeset 1:e65414bf35c5
 
   $ cd ..
   $ hg init sim


More information about the Mercurial-devel mailing list