diff options
author | René Kijewski <kijewski@library.vetmed.fu-berlin.de> | 2021-11-30 13:54:29 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2021-12-01 01:13:09 -0800 |
commit | 671bc7f32fd150f04793d8d5dbe806e9d4cfe669 (patch) | |
tree | ae8db79ee0d9bd45de13b08972a046296dc1775b /testing/tests/ui/before_1.58 | |
parent | 3d82b59a2ae58e9c438315273f204fc2783eb0d3 (diff) | |
download | askama-671bc7f32fd150f04793d8d5dbe806e9d4cfe669.tar.gz askama-671bc7f32fd150f04793d8d5dbe806e9d4cfe669.tar.bz2 askama-671bc7f32fd150f04793d8d5dbe806e9d4cfe669.zip |
Fix tests for new error messages in Rust nightly
Diffstat (limited to 'testing/tests/ui/before_1.58')
4 files changed, 38 insertions, 0 deletions
diff --git a/testing/tests/ui/before_1.58/break_outside_of_loop.rs b/testing/tests/ui/before_1.58/break_outside_of_loop.rs new file mode 100644 index 0000000..ccbb0a9 --- /dev/null +++ b/testing/tests/ui/before_1.58/break_outside_of_loop.rs @@ -0,0 +1,11 @@ +use askama::Template; + +#[derive(Template)] +#[template( + source = "Have a {%break%}, have a parsing error!", + ext = "txt" +)] +struct MyTemplate; + +fn main() { +} diff --git a/testing/tests/ui/before_1.58/break_outside_of_loop.stderr b/testing/tests/ui/before_1.58/break_outside_of_loop.stderr new file mode 100644 index 0000000..99d1d25 --- /dev/null +++ b/testing/tests/ui/before_1.58/break_outside_of_loop.stderr @@ -0,0 +1,8 @@ +error: problems parsing template source at row 1, column 9 near: +"break%}, have a parsing error!" + --> $DIR/break_outside_of_loop.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) diff --git a/testing/tests/ui/before_1.58/typo_in_keyword.rs b/testing/tests/ui/before_1.58/typo_in_keyword.rs new file mode 100644 index 0000000..acbf5d7 --- /dev/null +++ b/testing/tests/ui/before_1.58/typo_in_keyword.rs @@ -0,0 +1,11 @@ +use askama::Template; + +#[derive(Template)] +#[template( + source = "{%for i in 1..=10%}{{i}}{%endfo%}\n1234567890123456789012345678901234567890", + ext = "txt" +)] +struct MyTemplate; + +fn main() { +} diff --git a/testing/tests/ui/before_1.58/typo_in_keyword.stderr b/testing/tests/ui/before_1.58/typo_in_keyword.stderr new file mode 100644 index 0000000..545476e --- /dev/null +++ b/testing/tests/ui/before_1.58/typo_in_keyword.stderr @@ -0,0 +1,8 @@ +error: problems parsing template source at row 1, column 26 near: +"endfo%}\n12345678901234567890123456789012"... + --> $DIR/typo_in_keyword.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) |