changeset 26660:7e1baad90121

tests: test of case-folding merge collisions
author Mads Kiilerich <madski@unity3d.com>
date Tue, 13 Oct 2015 00:16:25 +0200
parents df66736a128e
children 2b955fec91e0
files tests/test-casecollision-merge.t
diffstat 1 files changed, 40 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-casecollision-merge.t	Wed Aug 19 15:40:13 2015 -0500
+++ b/tests/test-casecollision-merge.t	Tue Oct 13 00:16:25 2015 +0200
@@ -191,6 +191,46 @@
 
   $ cd ..
 
+Prepare for tests of directory case-folding collisions
+
+  $ hg init directory-casing
+  $ cd directory-casing
+  $ touch 0 # test: file without directory
+  $ mkdir 0a
+  $ touch 0a/f
+  $ mkdir aA
+  $ touch aA/a
+  $ hg ci -Aqm0
+
+Directory/file case-folding collision:
+
+  $ hg up -q null
+  $ touch 00 # test: starts as '0'
+  $ mkdir 000 # test: starts as '0'
+  $ touch 000/f
+  $ touch Aa # test: collision with 'aA/a'
+  $ hg ci -Aqm1
+
+  $ hg merge 0
+  abort: Not a directory: '$TESTTMP/directory-casing/aA/a'
+  [255]
+(note: no collision between 0 and 00 or 000/f)
+
+Directory case-folding collision:
+
+  $ hg up -qC null
+  $ hg --config extensions.purge= purge
+  $ mkdir 0A0
+  $ touch 0A0/f # test: starts as '0a'
+  $ mkdir Aa
+  $ touch Aa/b # test: collision with 'aA/a'
+  $ hg ci -Aqm2
+
+  $ hg merge 0
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+
+  $ cd ..
 
 ################################
 test for linear updates