[PATCH 2 of 6] hgignore: add a few more weird patterns to test case

Yuya Nishihara yuya at tcha.org
Sun Jul 21 02:56:11 EDT 2019


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1563683844 -32400
#      Sun Jul 21 13:37:24 2019 +0900
# Node ID ffd98e7af307aed4765a0fefd59d5a1a8f49850a
# Parent  3b48980437122079907807800b5cdc5adfa8a6a6
hgignore: add a few more weird patterns to test case

diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -92,7 +92,7 @@ Ensure that comments work:
 
   $ touch 'foo#bar' 'quux#'
 #if no-windows
-  $ touch 'baz\wat'
+  $ touch 'baz\wat' 'ba0\#wat' 'ba1\\wat'
 #endif
   $ cat <<'EOF' >> .hgignore
   > # full-line comment
@@ -100,6 +100,8 @@ Ensure that comments work:
   > syntax# pattern, no whitespace, then comment
   > a.c  # pattern, then whitespace, then comment
   > baz\\# # (escaped) backslash, then comment
+  > ba0\\\#w # (escaped) backslash, escaped comment character, then comment
+  > ba1\\\\# # (escaped) backslashes, then comment
   > foo\#b # escaped comment character
   > quux\## escaped comment character at end of name
   > EOF
@@ -108,7 +110,7 @@ Ensure that comments work:
   ? .hgignore
   $ rm 'foo#bar' 'quux#'
 #if no-windows
-  $ rm 'baz\wat'
+  $ rm 'baz\wat' 'ba0\#wat' 'ba1\\wat'
 #endif
 
 Check that '^\.' does not ignore the root directory:


More information about the Mercurial-devel mailing list