Skip to content

Commit 8742522

Browse files
Add regression test for #706 and #708
1 parent db0a6f7 commit 8742522

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

testing/tests/auxiliary/paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
define_template!();

testing/tests/paths.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This test ensures that template paths work even when created from another file.
2+
#[test]
3+
fn cross_file_paths() {
4+
macro_rules! define_template {
5+
() => {
6+
#[derive(askama::Template)]
7+
#[template(path = "base-decl.txt")]
8+
struct Empty {}
9+
}
10+
}
11+
12+
#[path = "./auxiliary/paths.rs"]
13+
mod a;
14+
}

0 commit comments

Comments
 (0)