rhg: add a test involving hgignore lookaround stable
authorArseniy Alekseyev <aalekseyev@janestreet.com>
Mon, 31 Oct 2022 16:15:30 +0000
branchstable
changeset 49538 b51e5c2ab5fd
parent 49531 4e70efd5fd0e
child 49539 8076298b795a
rhg: add a test involving hgignore lookaround
tests/test-hgignore.t
--- a/tests/test-hgignore.t	Mon Oct 24 18:07:22 2022 +0200
+++ b/tests/test-hgignore.t	Mon Oct 31 16:15:30 2022 +0000
@@ -73,6 +73,24 @@
   [255]
 #endif
 
+  $ echo 're:^(?!a).*\.o$' > .hgignore
+#if no-rhg
+  $ hg status
+  A dir/b.o
+  ? .hgignore
+  ? a.c
+  ? a.o
+  ? syntax
+#endif
+#if rhg
+  $ hg status
+  Unsupported syntax regex parse error:
+      ^(?:^(?!a).*\.o$)
+           ^^^
+  error: look-around, including look-ahead and look-behind, is not supported
+  [255]
+#endif
+
 Ensure given files are relative to cwd
 
   $ echo "dir/.*\.o" > .hgignore