changeset 17364:0c41fb2d972a stable

test-fileset: test file status predicates
author Patrick Mezard <patrick@mezard.eu>
date Wed, 15 Aug 2012 18:04:50 +0200
parents 5d9e2031c0b1
children 8a0513bf030a
files tests/test-fileset.t
diffstat 1 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-fileset.t	Wed Aug 15 19:02:04 2012 +0200
+++ b/tests/test-fileset.t	Wed Aug 15 18:04:50 2012 +0200
@@ -7,10 +7,12 @@
   $ echo a > a1
   $ echo a > a2
   $ echo b > b1
+  $ echo b > b2
   $ hg ci -Am addfiles
   adding a1
   adding a2
   adding b1
+  adding b2
 
 Test operators and basic patterns
 
@@ -34,8 +36,43 @@
   a1
   $ fileset 'not (r"a*")'
   b1
+  b2
   $ fileset '! ("a*")'
   b1
+  b2
   $ fileset 'a* - a1'
   a2
 
+Test files status
+
+  $ rm a1
+  $ hg rm a2
+  $ echo b >> b2
+  $ hg cp b1 c1
+  $ echo c > c2
+  $ echo c > c3
+  $ cat > .hgignore <<EOF
+  > \.hgignore
+  > 2$
+  > EOF
+  $ fileset 'modified()'
+  b2
+  $ fileset 'added()'
+  c1
+  $ fileset 'removed()'
+  a2
+  $ fileset 'deleted()'
+  a1
+  $ fileset 'unknown()'
+  c3
+  $ fileset 'ignored()'
+  .hgignore
+  c2
+  $ fileset 'hgignore()'
+  a2
+  b2
+  $ fileset 'clean()'
+  b1
+  $ fileset 'copied()'
+  c1
+