-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: tjex <tjex@tjex.net>
- Loading branch information
Showing
7 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[note] | ||
filename = "untitled" | ||
|
||
[group.t1] | ||
paths = ["dir1", "dir1/dir2/dir3"] | ||
|
||
[group.t1.note] | ||
extension = "md" | ||
template = "template1.md" | ||
|
||
|
||
# This group sits between the two directories of t1. | ||
[group.t2] | ||
paths = ["dir1/dir2"] | ||
|
||
[group.t2.note] | ||
extension = "md" | ||
template = "template2.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Template 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Template 2 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$ cd issue-490 | ||
|
||
# This test ensures that group rules do not override other group | ||
# rules that are applied to child directories. | ||
|
||
# Test that group t1 rules are followed. | ||
$ zk new dir1 --dry-run | ||
>Template 1 | ||
2>{{working-dir}}/dir1/untitled.md | ||
|
||
# Test that group t1 rules are followed. | ||
$ zk new dir1/dir2/dir3 --dry-run | ||
>Template 1 | ||
2>{{working-dir}}/dir1/dir2/dir3/untitled.md | ||
|
||
# Test that group t2 rules are followed, signifying that nested group rules are | ||
# functioning correctly. | ||
$ zk new dir1/dir2 --dry-run | ||
>Template 2 | ||
2>{{working-dir}}/dir1/dir2/untitled.md | ||
|
||
# Test that explicit group override still works | ||
$ zk new dir1/dir2 --group t1 --dry-run | ||
>Template 1 | ||
2>{{working-dir}}/dir1/dir2/untitled.md |