test-fncache: test reserved / long paths
authorAdrian Buehlmann <adrian@cadifra.com>
Wed, 19 Sep 2012 20:33:20 +0200
changeset 17710 95d29533e2ee
parent 17694 fa714f3ed298
child 17711 cf204e9829f4
test-fncache: test reserved / long paths testing the store path encoding with real files
tests/test-fncache.t
--- a/tests/test-fncache.t	Mon Oct 01 23:05:02 2012 -0500
+++ b/tests/test-fncache.t	Wed Sep 19 20:33:20 2012 +0200
@@ -117,3 +117,43 @@
   .hg/undo.dirstate
   $ cd ..
 
+#if no-windows
+
+Encoding of reserved / long paths in the store
+
+  $ hg init r2
+  $ cd r2
+  $ cat <<EOF > .hg/hgrc
+  > [ui]
+  > portablefilenames = ignore
+  > EOF
+
+  $ DIR="bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL"
+  $ mkdir -p "$DIR"
+  $ echo foo > "$DIR/normal.c"
+  $ DIR="AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH"
+  $ mkdir -p "$DIR"
+  $ echo foo > "$DIR/LOREMIPSUM.TXT"
+  $ DIR="enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services"
+  $ mkdir -p "$DIR"
+  $ echo foo > "$DIR/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider"
+  $ DIR="Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother"
+  $ mkdir -p "$DIR"
+  $ echo foo > "$DIR/AndThenAnExtremelyLongFileName.txt"
+  $ DIR="12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345"
+  $ mkdir -p "$DIR"
+  $ echo foo > "$DIR/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz"
+  $ hg ci -qAm1
+  $ find .hg/store -name *.i  | sort
+  .hg/store/00changelog.i
+  .hg/store/00manifest.i
+  .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i
+  .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i
+  .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i
+  .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i
+  .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i
+
+  $ cd ..
+
+#endif
+