add a test for hgignore
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Fri, 28 Oct 2005 11:03:18 -0700
changeset 1478 e6dd91a88b57
parent 1477 d3566eda2bcb
child 1479 1a3c6689ef2b
add a test for hgignore
tests/test-hgignore
tests/test-hgignore.out
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hgignore	Fri Oct 28 11:03:18 2005 -0700
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+hg init
+touch a.o
+touch a.c
+touch syntax
+mkdir dir
+touch dir/a.o
+touch dir/b.o
+touch dir/c.o
+
+hg add dir/a.o
+hg commit -m 0
+hg add dir/b.o
+
+echo "--" ; hg status
+
+echo "*.o" > .hgignore
+echo "--" ; hg status
+
+echo ".*\.o" > .hgignore
+echo "--" ; hg status
+
+# XXX: broken
+#echo "glob:**.o" > .hgignore
+#echo "--" ; hg status
+#
+#echo "glob:*.o" > .hgignore
+#echo "--" ; hg status
+
+echo "syntax: invalid" > .hgignore
+echo "--" ; hg status
+
+echo "syntax: glob" > .hgignore
+echo "*.o" >> .hgignore
+echo "--" ; hg status
+
+echo "relglob:syntax*" > .hgignore
+echo "--" ; hg status
+
+echo "relglob:*" > .hgignore
+echo "--" ; hg status
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-hgignore.out	Fri Oct 28 11:03:18 2005 -0700
@@ -0,0 +1,34 @@
+--
+A dir/b.o
+? a.c
+? a.o
+? dir/c.o
+? syntax
+--
+abort: invalid pattern: relre:*.o
+--
+A dir/b.o
+? .hgignore
+? a.c
+? syntax
+--
+ignoring invalid syntax 'invalid'
+A dir/b.o
+? .hgignore
+? a.c
+? a.o
+? dir/c.o
+? syntax
+--
+A dir/b.o
+? .hgignore
+? a.c
+? syntax
+--
+A dir/b.o
+? .hgignore
+? a.c
+? a.o
+? dir/c.o
+--
+A dir/b.o