Skip to content

Commit

Permalink
Add more UI tests (lambda-fairy#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored Mar 13, 2021
1 parent 4cffcd2 commit 7284924
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 0 deletions.
7 changes: 7 additions & 0 deletions maud/tests/warnings/attribute-missing-value.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use maud::html;

fn main() {
html! {
a href=
};
}
9 changes: 9 additions & 0 deletions maud/tests/warnings/attribute-missing-value.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error: unexpected end of input
--> $DIR/attribute-missing-value.rs:4:5
|
4 | / html! {
5 | | a href=
6 | | };
| |______^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
7 changes: 7 additions & 0 deletions maud/tests/warnings/class-shorthand-missing-value.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use maud::html;

fn main() {
html! {
p.
};
}
9 changes: 9 additions & 0 deletions maud/tests/warnings/class-shorthand-missing-value.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error: unexpected end of input
--> $DIR/class-shorthand-missing-value.rs:4:5
|
4 | / html! {
5 | | p.
6 | | };
| |______^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
7 changes: 7 additions & 0 deletions maud/tests/warnings/element-missing-body.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use maud::html;

fn main() {
html! {
p
};
}
9 changes: 9 additions & 0 deletions maud/tests/warnings/element-missing-body.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error: unexpected end of input
--> $DIR/element-missing-body.rs:4:5
|
4 | / html! {
5 | | p
6 | | };
| |______^
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
7 changes: 7 additions & 0 deletions maud/tests/warnings/non-string-literal.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
use maud::html;

fn main() {
html! {
42
};
}
5 changes: 5 additions & 0 deletions maud/tests/warnings/non-string-literal.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
error: expected string
--> $DIR/non-string-literal.rs:5:9
|
5 | 42
| ^^

0 comments on commit 7284924

Please sign in to comment.