mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 05:21:14 +00:00
Add UI regression tests for cyclic dependencies
This commit is contained in:
parent
1899765230
commit
7f6beca8a8
1
testing/templates/cycle1.html
Normal file
1
testing/templates/cycle1.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends "cycle1.html" %}
|
1
testing/templates/cycle2.html
Normal file
1
testing/templates/cycle2.html
Normal file
@ -0,0 +1 @@
|
||||
{% extends "cycle2.html" %}
|
8
testing/tests/ui/cycle.rs
Normal file
8
testing/tests/ui/cycle.rs
Normal file
@ -0,0 +1,8 @@
|
||||
use askama::Template;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "cycle2.html")]
|
||||
struct Cycle;
|
||||
|
||||
fn main() {
|
||||
}
|
9
testing/tests/ui/cycle.stderr
Normal file
9
testing/tests/ui/cycle.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error: cyclic dependency in graph [
|
||||
"\"$WORKSPACE/target/tests/trybuild/askama_testing/templates/cycle2.html/" --> \"$WORKSPACE/target/tests/trybuild/askama_testing/templates/cycle2.html/"",
|
||||
]
|
||||
--> tests/ui/cycle.rs:3:10
|
||||
|
|
||||
3 | #[derive(Template)]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
|
8
testing/tests/ui/cycle2.rs
Normal file
8
testing/tests/ui/cycle2.rs
Normal file
@ -0,0 +1,8 @@
|
||||
use askama::Template;
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "cycle1.html")]
|
||||
struct Cycle;
|
||||
|
||||
fn main() {
|
||||
}
|
9
testing/tests/ui/cycle2.stderr
Normal file
9
testing/tests/ui/cycle2.stderr
Normal file
@ -0,0 +1,9 @@
|
||||
error: cyclic dependency in graph [
|
||||
"\"$WORKSPACE/target/tests/trybuild/askama_testing/templates/cycle1.html/" --> \"$WORKSPACE/target/tests/trybuild/askama_testing/templates/cycle1.html/"",
|
||||
]
|
||||
--> tests/ui/cycle2.rs:3:10
|
||||
|
|
||||
3 | #[derive(Template)]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
|
Loading…
x
Reference in New Issue
Block a user