diff --git a/tests/source/macros.rs b/tests/source/macros.rs index c8f769062542..ff24939668c2 100644 --- a/tests/source/macros.rs +++ b/tests/source/macros.rs @@ -216,3 +216,11 @@ make_test!(str_searcher_ascii_haystack, "bb", "abbcbbd", [ Reject(6, 7), ]); } + +fn special_case_macros() { + // format! + let s = format!("Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", result, input, expected); + + // assert! + assert!(result, "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", result, input, expected); +} diff --git a/tests/target/macros.rs b/tests/target/macros.rs index 25156ff21fda..8230ae911618 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -270,3 +270,18 @@ fn issue2214() { ] ); } + +fn special_case_macros() { + // format! + let s = format!( + "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", + result, input, expected + ); + + // assert! + assert!( + result, + "Arr! While plunderin' the hold, we got '{}' when given '{}' (we expected '{}')", + result, input, expected + ); +}