tests: use 'hghave symlink' for tests using symlinks
authorMads Kiilerich <mads@kiilerich.com>
Mon, 07 Nov 2011 03:14:54 +0100
changeset 15441 e0348815e806
parent 15440 9ab2b3b730ee
child 15442 db0340f4b507
tests: use 'hghave symlink' for tests using symlinks
tests/hghave
tests/test-audit-path.t
tests/test-commit.t
tests/test-convert-bzr.t
tests/test-convert-svn-sink.t
tests/test-convert-tla.t
tests/test-extdiff.t
tests/test-import-bypass.t
tests/test-import-git.t
tests/test-keyword.t
tests/test-largefiles.t
tests/test-manifest.t
tests/test-merge-symlinks.t
tests/test-merge-types.t
tests/test-rename.t
tests/test-symlink-placeholder.t
--- a/tests/hghave	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/hghave	Mon Nov 07 03:14:54 2011 +0100
@@ -161,7 +161,7 @@
     return matchoutput('p4 -V', r'Rev\. P4/') and matchoutput('p4d -V', r'Rev\. P4D/')
 
 def has_symlink():
-    return hasattr(os, "symlink")
+    return hasattr(os, "symlink") # FIXME: should also check file system and os
 
 def has_tla():
     return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
--- a/tests/test-audit-path.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-audit-path.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ hg init
 
 should fail
--- a/tests/test-commit.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-commit.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
 commit date test
 
   $ hg init test
--- a/tests/test-convert-bzr.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-convert-bzr.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,4 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
 
   $ . "$TESTDIR/bzr-definitions"
 
--- a/tests/test-convert-svn-sink.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-convert-svn-sink.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,5 +1,4 @@
-
-  $ "$TESTDIR/hghave" svn13 no-outer-repo || exit 80
+  $ "$TESTDIR/hghave" svn13 no-outer-repo symlink || exit 80
 
   $ fixpath()
   > {
--- a/tests/test-convert-tla.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-convert-tla.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,5 +1,5 @@
 
-  $ "$TESTDIR/hghave" tla || exit 80
+  $ "$TESTDIR/hghave" tla symlink || exit 80
   $ tla my-id "mercurial <mercurial@selenic.com>"
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "convert=" >> $HGRCPATH
--- a/tests/test-extdiff.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-extdiff.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "extdiff=" >> $HGRCPATH
 
--- a/tests/test-import-bypass.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-import-bypass.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "purge=" >> $HGRCPATH
   $ echo "graphlog=" >> $HGRCPATH
--- a/tests/test-import-git.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-import-git.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,4 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
 
   $ hg init
 
--- a/tests/test-keyword.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-keyword.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ cat <<EOF >> $HGRCPATH
   > [extensions]
   > keyword =
--- a/tests/test-largefiles.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-largefiles.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
   > largefiles=
--- a/tests/test-manifest.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-manifest.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
 Source bundle was generated with the following script:
 
 # hg init
--- a/tests/test-merge-symlinks.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-merge-symlinks.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,4 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
 
   $ cat > echo.py <<EOF
   > #!/usr/bin/env python
--- a/tests/test-merge-types.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-merge-types.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ hg init
 
   $ echo a > a
--- a/tests/test-rename.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-rename.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
   $ hg init
   $ mkdir d1 d1/d11 d2
   $ echo d1/a > d1/a
--- a/tests/test-symlink-placeholder.t	Mon Nov 07 03:14:54 2011 +0100
+++ b/tests/test-symlink-placeholder.t	Mon Nov 07 03:14:54 2011 +0100
@@ -1,3 +1,5 @@
+  $ "$TESTDIR/hghave" symlink || exit 80
+
 Create extension that can disable symlink support:
 
   $ cat > nolink.py <<EOF