Refactor path commands (#9687)

This commit is contained in:
Jakub Žádník
2023-07-15 00:04:22 +03:00
committed by GitHub
parent 8c52b7a23a
commit ba766de5d1
14 changed files with 254 additions and 338 deletions

View File

@ -99,21 +99,6 @@ fn parses_ignoring_extension_gets_stem() {
assert_eq!(actual.out, "spam.tar.gz");
}
#[test]
fn parses_column_path_extension() {
let actual = nu!(
cwd: "tests", pipeline(
r#"
echo [[home, barn]; ['home/viking/spam.txt', 'barn/cow/moo.png']]
| path parse -c [ home barn ]
| get barn
| get extension.0
"#
));
assert_eq!(actual.out, "png");
}
#[test]
fn parses_into_correct_number_of_columns() {
let actual = nu!(