Fix cd .. to the root directory

The leading slash always needs to be present, even if there aren't any other
components. This was introduced by the Rust port.
This commit is contained in:
Xiretza
2024-07-28 16:40:14 +00:00
committed by Peter Ammon
parent 3d816174fd
commit fd006e02da
2 changed files with 20 additions and 2 deletions

View File

@@ -194,6 +194,12 @@ cd $old_path
cd file
cd $old_path
# Test that going up to the root directory using .. works
cd /(string split --no-empty -f 1 / (pwd))
cd ..
pwd
#CHECK: /
# cd back before removing the test directory again.
cd $oldpwd
rm -Rf $base