Skip to content
Snippets Groups Projects
Commit 24f0023b authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

hgignore: update \-escape test to reflect actual behavior

"\\<char>" is not an escape character but "\\" + <char>.
parent a2c02877
No related branches found
No related tags found
No related merge requests found
...@@ -92,10 +92,10 @@ ...@@ -92,10 +92,10 @@
$ touch 'foo#bar' 'quux#' $ touch 'foo#bar' 'quux#'
#if no-windows #if no-windows
$ touch 'baz\#wat' $ touch 'baz\wat'
#endif #endif
$ cat <<'EOF' >> .hgignore $ cat <<'EOF' >> .hgignore
> # full-line comment > # full-line comment
> # whitespace-only comment line > # whitespace-only comment line
> syntax# pattern, no whitespace, then comment > syntax# pattern, no whitespace, then comment
> a.c # pattern, then whitespace, then comment > a.c # pattern, then whitespace, then comment
...@@ -96,10 +96,10 @@ ...@@ -96,10 +96,10 @@
#endif #endif
$ cat <<'EOF' >> .hgignore $ cat <<'EOF' >> .hgignore
> # full-line comment > # full-line comment
> # whitespace-only comment line > # whitespace-only comment line
> syntax# pattern, no whitespace, then comment > syntax# pattern, no whitespace, then comment
> a.c # pattern, then whitespace, then comment > a.c # pattern, then whitespace, then comment
> baz\\# # escaped comment character > baz\\# # (escaped) backslash, then comment
> foo\#b # escaped comment character > foo\#b # escaped comment character
> quux\## escaped comment character at end of name > quux\## escaped comment character at end of name
> EOF > EOF
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
? .hgignore ? .hgignore
$ rm 'foo#bar' 'quux#' $ rm 'foo#bar' 'quux#'
#if no-windows #if no-windows
$ rm 'baz\#wat' $ rm 'baz\wat'
#endif #endif
Check that '^\.' does not ignore the root directory: Check that '^\.' does not ignore the root directory:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment