Remove parser keywords label from commands that do not need it (#8780)

This commit is contained in:
Jakub Žádník
2023-04-07 01:12:21 +03:00
committed by GitHub
parent c12b4b4af7
commit e54b867e8e
9 changed files with 21 additions and 64 deletions

View File

@ -126,6 +126,18 @@ fn alias_invalid_expression() {
assert!(actual.err.contains("cant_alias_expression"));
}
#[test]
fn alias_if() {
let actual = nu!(r#" alias spam = if true { 'spam' } else { 'eggs' }; spam "#);
assert_eq!(actual.out, "spam");
}
#[test]
fn alias_match() {
let actual = nu!(r#" alias spam = match 3 { 1..10 => 'yes!' }; spam "#);
assert_eq!(actual.out, "yes!");
}
// Issue https://github.com/nushell/nushell/issues/8103
#[test]
fn alias_multiword_name() {