comparison tests/test-hgignore.t @ 42632:c67e3f966867

hgignore: add a few more weird patterns to test case
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 Jul 2019 13:37:24 +0900
parents 24f0023bb8b1
children f78f305454fd
comparison
equal deleted inserted replaced
42631:24f0023bb8b1 42632:c67e3f966867
90 90
91 Ensure that comments work: 91 Ensure that comments work:
92 92
93 $ touch 'foo#bar' 'quux#' 93 $ touch 'foo#bar' 'quux#'
94 #if no-windows 94 #if no-windows
95 $ touch 'baz\wat' 95 $ touch 'baz\wat' 'ba0\#wat' 'ba1\\wat'
96 #endif 96 #endif
97 $ cat <<'EOF' >> .hgignore 97 $ cat <<'EOF' >> .hgignore
98 > # full-line comment 98 > # full-line comment
99 > # whitespace-only comment line 99 > # whitespace-only comment line
100 > syntax# pattern, no whitespace, then comment 100 > syntax# pattern, no whitespace, then comment
101 > a.c # pattern, then whitespace, then comment 101 > a.c # pattern, then whitespace, then comment
102 > baz\\# # (escaped) backslash, then comment 102 > baz\\# # (escaped) backslash, then comment
103 > ba0\\\#w # (escaped) backslash, escaped comment character, then comment
104 > ba1\\\\# # (escaped) backslashes, then comment
103 > foo\#b # escaped comment character 105 > foo\#b # escaped comment character
104 > quux\## escaped comment character at end of name 106 > quux\## escaped comment character at end of name
105 > EOF 107 > EOF
106 $ hg status 108 $ hg status
107 A dir/b.o 109 A dir/b.o
108 ? .hgignore 110 ? .hgignore
109 $ rm 'foo#bar' 'quux#' 111 $ rm 'foo#bar' 'quux#'
110 #if no-windows 112 #if no-windows
111 $ rm 'baz\wat' 113 $ rm 'baz\wat' 'ba0\#wat' 'ba1\\wat'
112 #endif 114 #endif
113 115
114 Check that '^\.' does not ignore the root directory: 116 Check that '^\.' does not ignore the root directory:
115 117
116 $ echo "^\." > .hgignore 118 $ echo "^\." > .hgignore