1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
fix error message checks in tests
Fix for struct_append taken from upstream commit by Jason Francis <jafrancis999@gmail.com>
https://github.com/jf2048/deluxe/commit/50670c1dd39dff3641f9af450ac08119bb5af5e8
Fix for multi_attributes written by Peter Michael Green.
tests/meta.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: deluxe/tests/meta.rs
===================================================================
--- deluxe.orig/tests/meta.rs
+++ deluxe/tests/meta.rs
@@ -423,7 +423,7 @@ fn struct_append() {
);
::std::assert_eq!(
parse(q! { { idents = [], exprs = ! } }).unwrap_err_string(),
- "unexpected end of input, expected expression"
+ "unexpected end of input, expected an expression"
);
}
Index: deluxe/tests/attributes.rs
===================================================================
--- deluxe.orig/tests/attributes.rs
+++ deluxe/tests/attributes.rs
@@ -100,7 +100,7 @@ fn multi_attributes() {
let expr = ::syn::parse2(q! { #[multi2('c')] #[multi2('d')] true }).unwrap();
::std::assert_eq!(
- ::deluxe::parse_attributes::<::syn::Expr, MultiAttributes>(&expr).unwrap_err_string(),
+ &::deluxe::parse_attributes::<::syn::Expr, MultiAttributes>(&expr).unwrap_err_string()[..16],
"unexpected token"
);
}
|