-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
308 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ __pycache__/ | |
|
||
### Poetry ### | ||
dist/ | ||
|
||
### Beet ### | ||
.out |
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,7 @@ | ||
data_pack: | ||
load: src | ||
overlays: | ||
- formats: | ||
min_inclusive: 48 | ||
max_inclusive: 48 | ||
directory: overlay_48 |
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 @@ | ||
say I'm here now |
1 change: 1 addition & 0 deletions
1
examples/sanity_test/src/overlay_48/data/demo/function/demo.mcfunction
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 @@ | ||
say I was here first |
Large diffs are not rendered by default.
Oops, something went wrong.
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,47 @@ | ||
# Lectern snapshot | ||
|
||
## Data pack | ||
|
||
`@data_pack pack.mcmeta` | ||
|
||
```json | ||
{ | ||
"pack": { | ||
"pack_format": 48, | ||
"description": "" | ||
}, | ||
"overlays": { | ||
"entries": [ | ||
{ | ||
"formats": { | ||
"min_inclusive": 48, | ||
"max_inclusive": 48 | ||
}, | ||
"directory": "overlay_48" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
### demo | ||
|
||
`@function demo:demo` | ||
|
||
```mcfunction | ||
say I'm here now | ||
``` | ||
|
||
## Overlay `overlay_48` | ||
|
||
`@overlay overlay_48` | ||
|
||
### demo | ||
|
||
`@function demo:demo` | ||
|
||
```mcfunction | ||
say I was here first | ||
``` | ||
|
||
`@endoverlay` |
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,16 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
import pytest | ||
from beet import ProjectCache, run_beet | ||
from lectern import Document | ||
from pytest_insta import SnapshotFixture | ||
|
||
|
||
@pytest.mark.parametrize("directory", os.listdir("examples")) | ||
def test_build(snapshot: SnapshotFixture, directory: str, tmp_path: Path): | ||
with run_beet( | ||
directory=f"examples/{directory}", | ||
cache=ProjectCache(tmp_path / ".beet_cache", tmp_path / "generated"), | ||
) as ctx: | ||
assert snapshot("pack.md") == ctx.inject(Document) |