add @ error tests

This commit is contained in:
ConnorSkees 2020-04-06 00:34:48 -04:00
parent ef282c5c18
commit a55cf39cc2

15
tests/at-error.rs Normal file
View File

@ -0,0 +1,15 @@
#![cfg(test)]
#[macro_use]
mod macros;
error!(
error_dblquoted_string,
"a {\n @error \"hi\";\n}\n", "Error: \"hi\""
);
error!(
error_sglquoted_string,
"a {\n @error 'hi';\n}\n", "Error: \"hi\""
);
error!(error_unquoted_string, "a {\n @error hi;\n}\n", "Error: hi");
error!(error_arithmetic, "a {\n @error 1 + 1;\n}\n", "Error: 2");