tests/test-audit-path.t
changeset 16908 6a997aacba5d
parent 16350 4f795f5fbb0b
child 16913 f2719b387380
--- a/tests/test-audit-path.t	Sun Jun 10 18:50:42 2012 +0200
+++ b/tests/test-audit-path.t	Sun Jun 10 18:50:42 2012 +0200
@@ -1,28 +1,24 @@
-  $ "$TESTDIR/hghave" symlink || exit 80
-
   $ hg init
 
-should fail
+audit of .hg
 
   $ hg add .hg/00changelog.i
   abort: path contains illegal component: .hg/00changelog.i (glob)
   [255]
 
+#if symlink
+
+Symlinks
+
   $ mkdir a
   $ echo a > a/a
   $ hg ci -Ama
   adding a/a
   $ ln -s a b
   $ echo b > a/b
-
-should fail
-
   $ hg add b/b
   abort: path 'b/b' traverses symbolic link 'b' (glob)
   [255]
-
-should succeed
-
   $ hg add b
 
 should still fail - maybe
@@ -31,6 +27,9 @@
   abort: path 'b/b' traverses symbolic link 'b' (glob)
   [255]
 
+#endif
+
+
 unbundle tampered bundle
 
   $ hg init target
@@ -47,7 +46,7 @@
   $ hg manifest -r0
   .hg/test
   $ hg update -Cr0
-  abort: path contains illegal component: .hg/test
+  abort: path contains illegal component: .hg/test (glob)
   [255]
 
 attack foo/.hg/test
@@ -55,7 +54,7 @@
   $ hg manifest -r1
   foo/.hg/test
   $ hg update -Cr1
-  abort: path 'foo/.hg/test' is inside nested repo 'foo'
+  abort: path 'foo/.hg/test' is inside nested repo 'foo' (glob)
   [255]
 
 attack back/test where back symlinks to ..
@@ -63,16 +62,23 @@
   $ hg manifest -r2
   back
   back/test
+#if symlink
   $ hg update -Cr2
   abort: path 'back/test' traverses symbolic link 'back'
   [255]
+#else
+('back' will be a file and cause some other system specific error)
+  $ hg update -Cr2
+  abort: * (glob)
+  [255]
+#endif
 
 attack ../test
 
   $ hg manifest -r3
   ../test
   $ hg update -Cr3
-  abort: path contains illegal component: ../test
+  abort: path contains illegal component: ../test (glob)
   [255]
 
 attack /tmp/test