tests/test-keyword.t
changeset 868 16cfcb56859a
parent 850 3c5de8747a32
child 874 272a8a316f7a
--- a/tests/test-keyword.t	Thu Dec 02 09:41:56 2010 +0100
+++ b/tests/test-keyword.t	Thu Dec 02 09:42:21 2010 +0100
@@ -553,7 +553,8 @@
   $ hg forget i
   $ rm i
 
-cp symlink (becomes regular file), and hg copy after
+cp symlink file; hg cp -A symlink file (part1)
+- copied symlink points to kwfile: overwrite
 
   $ cp sym i
   $ ls -l i
@@ -602,6 +603,26 @@
   $ hg update --clean
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
+cp symlink file; hg cp -A symlink file (part2)
+- copied symlink points to kw ignored file: do not overwrite
+
+  $ cat a > i
+  $ ln -s i symignored
+  $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
+  $ cp symignored x
+  $ hg copy --after --verbose symignored x
+  copying symignored to x
+  $ head -n 1 x
+  expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
+  $ hg forget x
+  $ rm x
+
+  $ hg rollback
+  rolling back to revision 1 (undo commit)
+  $ hg update --clean
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ rm i symignored
+
 Custom keywordmaps as argument to kwdemo
 
   $ hg --quiet kwdemo "Xinfo = {author}: {desc}"