Skip to content

Commit 1731d56

Browse files
committed
[ignoring-somethings] Add unit test
1 parent edd1945 commit 1731d56

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
initialization:
2+
steps:
3+
- type: commit
4+
empty: true
5+
message: Empty commit
6+
id: start
7+
- type: new-file
8+
filename: .gitignore
9+
contents: |
10+
many/*
11+
!many/file22.txt
12+
ignore_me.txt
13+
this/is/very/nested/runaway.txt
14+
- type: add
15+
files:
16+
- .gitignore
17+
- type: commit
18+
message: Add .gitignore

ignoring_somethings/tests/test_verify.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from ..verify import (
44
NOT_IGNORING_IGNORE_ME,
55
NOT_IGNORING_RUNAWAY,
6+
NOT_PATTERN_MATCHING_RUNAWAY,
67
STILL_HIDING,
78
STILL_IGNORING_FILE_22,
89
verify,
@@ -34,3 +35,12 @@ def test_no_change():
3435
NOT_IGNORING_RUNAWAY,
3536
],
3637
)
38+
39+
40+
def test_not_pattern_matching():
41+
with loader.load("specs/not_pattern_matching.yml", "start") as output:
42+
assert_output(
43+
output,
44+
GitAutograderStatus.UNSUCCESSFUL,
45+
[NOT_PATTERN_MATCHING_RUNAWAY],
46+
)

0 commit comments

Comments
 (0)