From 5d4cb8efa998976c76a0232303554399179e501b Mon Sep 17 00:00:00 2001 From: xxchan Date: Thu, 16 May 2024 22:28:05 +0800 Subject: [PATCH] update test Signed-off-by: xxchan --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) 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]