Skip to content

Commit

Permalink
.gitignore: Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Jul 22, 2020
1 parent dd2bb03 commit 286e22b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/languages/ignore/comment_feature.test
@@ -0,0 +1,19 @@
# Simple comment
## Section comment
### Header comment
\# Not a comment
\## Not a section

----------------------------------------------------

[
["comment", "# Simple comment"],
["section", "## Section comment"],
["header", "### Header comment"],
["entry", ["\\# Not a comment"]],
["entry", ["\\#"]], ["comment", "# Not a section"]
]

----------------------------------------------------

Checks for comments.
19 changes: 19 additions & 0 deletions tests/languages/ignore/entry_feature.test
@@ -0,0 +1,19 @@
foo/bar/
foo/file[1-3].txt
!unignore
\!foo/**
notes\[1\].txt

----------------------------------------------------

[
["entry", ["foo", ["punctuation", "/"], "bar", ["punctuation", "/"]]],
["entry", ["foo", ["punctuation", "/"], "file", ["regex", "["], "1-3", ["regex", "]"], ".txt"]],
["entry", [["regex", "!"], "unignore"]],
["entry", ["\\!foo", ["punctuation", "/"], "**"]],
["entry", ["notes\\[1\\].txt"]]
]

----------------------------------------------------

Checks for comments.

0 comments on commit 286e22b

Please sign in to comment.