Skip to content

Commit

Permalink
Add test for orphan fragments with numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mdellweg committed Nov 7, 2023
1 parent a275be9 commit ae9f321
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
.vs/
.vscode
Justfile
*egg-info/
towncrier.test.test_*/
_trial_temp*/
apidocs/
dist/
Expand Down
12 changes: 12 additions & 0 deletions src/towncrier/test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def _test_command(self, command):
f.write("Orphaned feature")
with open("foo/newsfragments/+xxx.feature", "w") as f:
f.write("Another orphaned feature")
with open("foo/newsfragments/+123_orphaned.feature", "w") as f:
f.write("An orphaned feature starting with a number")
with open("foo/newsfragments/+12.3_orphaned.feature", "w") as f:
f.write("An orphaned feature starting with a dotted number")
with open("foo/newsfragments/+orphaned_123.feature", "w") as f:
f.write("An orphaned feature ending with a number")
with open("foo/newsfragments/+orphaned_12.3.feature", "w") as f:
f.write("An orphaned feature ending with a dotted number")
# Towncrier ignores files that don't have a dot
with open("foo/newsfragments/README", "w") as f:
f.write("Blah blah")
Expand Down Expand Up @@ -73,6 +81,10 @@ def _test_command(self, command):
- Baz fix levitation (#2)
- Adds levitation (#123)
- Extends levitation (#124)
- An orphaned feature ending with a dotted number
- An orphaned feature ending with a number
- An orphaned feature starting with a dotted number
- An orphaned feature starting with a number
- Another orphaned feature
- Orphaned feature
Expand Down

0 comments on commit ae9f321

Please sign in to comment.