From 4a06821a5edd35ab576b2bb4a66b03f3b2b548e8 Mon Sep 17 00:00:00 2001 From: Vivek Date: Wed, 29 Jan 2025 20:25:40 -0600 Subject: [PATCH] added parent path test to windows examples --- crates/nu-command/src/path/relative_to.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/nu-command/src/path/relative_to.rs b/crates/nu-command/src/path/relative_to.rs index b7bc5dad87..3be9a12c52 100644 --- a/crates/nu-command/src/path/relative_to.rs +++ b/crates/nu-command/src/path/relative_to.rs @@ -113,6 +113,12 @@ path."# example: r"'eggs\bacon\sausage\spam' | path relative-to 'eggs\bacon\sausage'", result: Some(Value::test_string(r"spam")), }, + Example { + description: "Find a relative path that requires parent directory symbols", + example: r"'a\b\c' | path relative-to 'a\d\e'", + + result: Some(Value::test_string(r"..\..\b\c")), + }, ] }