Mercurial > hg
changeset 27326:ee2d7b5daa8a
test-hgignore.t: add tests for comments
Although support for comments in hgignore files has existed for a
while, it was previously untested.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 10 Dec 2015 21:32:19 -0800 |
parents | eadbbd14bdc1 |
children | d500341e4f55 |
files | tests/test-hgignore.t |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-hgignore.t Wed Dec 09 05:56:54 2015 +0000 +++ b/tests/test-hgignore.t Thu Dec 10 21:32:19 2015 -0800 @@ -55,6 +55,23 @@ ? a.c ? syntax +Ensure that comments work: + + $ touch 'foo#bar' 'quux#' 'baz\#wat' + $ cat <<'EOF' >> .hgignore + > # full-line comment + > # whitespace-only comment line + > syntax# pattern, no whitespace, then comment + > a.c # pattern, then whitespace, then comment + > baz\\# # escaped comment character + > foo\#b # escaped comment character + > quux\## escaped comment character at end of name + > EOF + $ hg status + A dir/b.o + ? .hgignore + $ rm 'foo#bar' 'quux#' 'baz\#wat' + Check it does not ignore the current directory '.': $ echo "^\." > .hgignore