Parser panic for signature with multibyte char for short flag #8821 (#8849)

Hey I'm a developer and I'm still new to nushell and rust but I would
like to learn more about both. This is my first PR for this project.

The intent of my change is to allow to use multibyte utf-8 characters in
commands short flags.
This commit is contained in:
federico viscomi
2023-04-10 22:52:51 +01:00
committed by GitHub
parent c3678764b4
commit eb4d19fb9c
2 changed files with 66 additions and 47 deletions

View File

@ -237,3 +237,14 @@ fn numberlike_command_name() {
assert!(actual.err.contains("backticks"));
}
#[test]
fn call_command_with_non_ascii_argument() {
let actual = nu!(cwd: "tests/parsing/samples",
r#"
def nu-arg [--umlaut(-ö): int] {}
nu-arg -ö 42
"#);
assert_eq!(actual.err.len(), 0);
}