diff --git a/src/lib.rs b/src/lib.rs index 8918a04..cad5405 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -857,6 +857,9 @@ line1 // Check `expect![[ ]]` as well. assert_eq!(locate_end("[]]"), Some(2)); + // For `expect![]]`, this will be invalid syntax: Syntax Error: expected SEMICOLON + // In `locate_end`, we just find the first `]` is the end position and ignores the rest. + assert_eq!(locate_end("]]"), Some(0)); } #[test]