Fix path join on streams (#4959)

This commit is contained in:
JT
2022-03-26 07:46:48 +13:00
committed by GitHub
parent 2252833917
commit 12b85beecc
2 changed files with 19 additions and 8 deletions

View File

@ -31,6 +31,18 @@ fn returns_path_joined_from_list() {
assert_eq!(actual.out, expected);
}
#[test]
fn drop_one_path_join() {
let actual = nu!(
cwd: "tests", pipeline(
r#"[a, b, c] | drop 1 | path join
"#
));
let expected = join_path_sep(&["a", "b"]);
assert_eq!(actual.out, expected);
}
#[test]
fn appends_slash_when_joined_with_empty_path() {
let actual = nu!(