tests/test-arbitraryfilectx.t
branchstable
changeset 34936 9645c2a2bc2a
parent 34835 14c87708f432
child 35987 a36d3c8a0e41
--- a/tests/test-arbitraryfilectx.t	Sat Oct 28 12:35:54 2017 -0700
+++ b/tests/test-arbitraryfilectx.t	Thu Oct 19 23:16:48 2017 -0400
@@ -19,6 +19,7 @@
   $ mkdir case1
   $ cd case1
   $ hg init
+#if symlink
   $ printf "A" > real_A
   $ printf "foo" > A
   $ printf "foo" > B
@@ -29,6 +30,44 @@
   adding real_A
   adding sym_A
   $ hg commit -m "base"
+#else
+  $ hg import -q --bypass - <<EOF
+  > # HG changeset patch
+  > # User test
+  > # Date 0 0
+  > base
+  > 
+  > diff --git a/A b/A
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/A
+  > @@ -0,0 +1,1 @@
+  > +foo
+  > \ No newline at end of file
+  > diff --git a/B b/B
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/B
+  > @@ -0,0 +1,1 @@
+  > +foo
+  > \ No newline at end of file
+  > diff --git a/real_A b/real_A
+  > new file mode 100644
+  > --- /dev/null
+  > +++ b/real_A
+  > @@ -0,0 +1,1 @@
+  > +A
+  > \ No newline at end of file
+  > diff --git a/sym_A b/sym_A
+  > new file mode 120000
+  > --- /dev/null
+  > +++ b/sym_A
+  > @@ -0,0 +1,1 @@
+  > +A
+  > \ No newline at end of file
+  > EOF
+  $ hg up -q
+#endif
 
 These files are different and should return True (different):
 (Note that filecmp.cmp's return semantics are inverted from ours, so we invert
@@ -53,5 +92,10 @@
 
 A naive use of filecmp on those two would wrongly return True, since it follows
 the symlink to "A", which has different contents.
+#if symlink
   $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
   True (no-eol)
+#else
+  $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
+  False (no-eol)
+#endif