tests/test-hgignore.t
branchstable
changeset 49605 b3480822a251
parent 49604 086b0c4f8663
--- a/tests/test-hgignore.t	Wed Nov 16 16:38:42 2022 +0100
+++ b/tests/test-hgignore.t	Wed Nov 16 15:39:10 2022 +0100
@@ -74,6 +74,8 @@
   A dir/b.o
   ? a.c
   ? syntax
+  $ hg debugignore
+  <includematcher includes='(?i:.*\\.O$)|.*.hgignore'>
 
 regex with flag is not the first one
 
@@ -83,6 +85,8 @@
   A dir/b.o
   ? a.c
   ? syntax
+  $ hg debugignore
+  <includematcher includes='.*.hgignore|(?i:.*\\.O$)'>
 
 flag in a pattern should affect that pattern only
 
@@ -93,6 +97,8 @@
   ? .hgignore
   ? a.c
   ? syntax
+  $ hg debugignore
+  <includematcher includes='(?i:.*\\.O$)|.*.HGIGNORE'>
 
   $ echo 're:.HGIGNORE' > .hgignore
   $ echo 're:(?i)\.O$' >> .hgignore
@@ -101,6 +107,32 @@
   ? .hgignore
   ? a.c
   ? syntax
+  $ hg debugignore
+  <includematcher includes='.*.HGIGNORE|(?i:.*\\.O$)'>
+
+Check that '^' after flag is properly detected.
+
+  $ echo 're:(?i)^[^a].*\.O$' > .hgignore
+  $ echo 're:.HGIGNORE' >> .hgignore
+  $ hg status
+  A dir/b.o
+  ? .hgignore
+  ? a.c
+  ? a.o
+  ? syntax
+  $ hg debugignore
+  <includematcher includes='(?i:^[^a].*\\.O$)|.*.HGIGNORE'>
+
+  $ echo 're:.HGIGNORE' > .hgignore
+  $ echo 're:(?i)^[^a].*\.O$' >> .hgignore
+  $ hg status
+  A dir/b.o
+  ? .hgignore
+  ? a.c
+  ? a.o
+  ? syntax
+  $ hg debugignore
+  <includematcher includes='.*.HGIGNORE|(?i:^[^a].*\\.O$)'>
 
 
 further testing