Vaishaag Subhagan 2023-04-17 19:51:10 +10:00 committed by GitHub
parent 4ecec59224
commit 6eb00f6c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -191,7 +191,7 @@ pub fn lex_item(
Some(ParseError::Unbalanced(
"{".to_string(),
"}".to_string(),
Span::new(span.end, span.end),
Span::new(span.end, span.end + 1),
)),
);
}

View File

@ -488,6 +488,11 @@ fn unbalanced_delimiter3() -> TestResult {
fail_test(r#"{"#, "Unexpected end of code")
}
#[test]
fn unbalanced_delimiter4() -> TestResult {
fail_test(r#"}"#, "unbalanced { and }")
}
#[test]
fn register_with_string_literal() -> TestResult {
fail_test(r#"register 'nu-plugin-math'"#, "File not found")