Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed May 23, 2021
1 parent 482c0b7 commit d54cdc1
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 8 deletions.
25 changes: 25 additions & 0 deletions tests/nav/hybrid/test_from_readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
nav:
- Foo: foo.md
- Usual:
- usual/a.md
- usual/b.md
- '*.md'
- Subdir: subdir/
files:
bar.md:
baz.md:
foo.md:
subdir/x.md:
subdir/y.md:
usual/a.md:
usual/b.md:
output:
- Foo: foo.md
- Usual:
- usual/a.md
- usual/b.md
- null: bar.md
- null: baz.md
- Subdir:
- null: subdir/x.md
- null: subdir/y.md
8 changes: 0 additions & 8 deletions tests/nav/hybrid/test_slash_without_nav.yml

This file was deleted.

8 changes: 8 additions & 0 deletions tests/nav/hybrid/test_wildcard_slash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
nav:
- '*/'
files:
a.md:
foo/c.md:
output:
- Foo:
- null: foo/c.md
18 changes: 18 additions & 0 deletions tests/nav/nested/test_implicit_index_as_nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
files:
index.md: |
* [Baz](baz.md)
* [Borgs](borgs/)
baz.md:
borgs/index.md: |
* [Bar](bar.md)
* [Foo](foo.md)
borgs/bar.md:
borgs/foo.md:
implicit_index: true
output:
- null: index.md
- null: baz.md
- Borgs:
- null: borgs/index.md
- null: borgs/bar.md
- null: borgs/foo.md
9 changes: 9 additions & 0 deletions tests/nav/wildcard/test_multidir_file.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
files:
SUMMARY.md: |
- */foo.md
aaa/bar.md:
aaa/foo.md:
bbb/foo.md:
output:
- null: aaa/foo.md
- null: bbb/foo.md
14 changes: 14 additions & 0 deletions tests/nav/wildcard/test_omits_competing_parent_first.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
files:
SUMMARY.md: |
- sub/*.md
- [sub](sub/)
sub/index.md:
sub/SUMMARY.md: |
- *.md
sub/a.md:
sub/b.md:
output:
- null: sub/index.md
- null: sub/SUMMARY.md
- null: sub/a.md
- null: sub/b.md
14 changes: 14 additions & 0 deletions tests/nav/wildcard/test_omits_competing_subdir_first.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
files:
SUMMARY.md: |
- [sub](sub/)
- sub/*.md
sub/index.md:
sub/SUMMARY.md: |
- *.md
sub/a.md:
sub/b.md:
output:
- sub:
- null: sub/index.md
- null: sub/a.md
- null: sub/b.md
18 changes: 18 additions & 0 deletions tests/nav/wildcard/test_omits_in_subdir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
files:
SUMMARY.md: |
- [a](sub/a.md)
- [sub](sub/)
- [b](sub/b.md)
- *.md
sub/index.md:
sub/SUMMARY.md: |
- *.md
sub/a.md:
sub/b.md:
sub/c.md:
output:
- a: sub/a.md
- sub:
- null: sub/index.md
- null: sub/c.md
- b: sub/b.md
17 changes: 17 additions & 0 deletions tests/nav/wildcard/test_omits_in_superdir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
files:
SUMMARY.md: |
- [sub](sub/)
- sub/*.md
sub/index.md:
sub/SUMMARY.md: |
- [a](a.md)
- [b](b.md)
sub/a.md:
sub/b.md:
sub/c.md:
output:
- sub:
- a: sub/a.md
- b: sub/b.md
- null: sub/index.md
- null: sub/c.md

0 comments on commit d54cdc1

Please sign in to comment.