Update pwd tests

This commit is contained in:
Ilan Cosman 2021-05-29 19:08:52 -07:00
parent 27c2d7754e
commit 138b60021f

View File

@ -2,10 +2,11 @@
function _pwd -a dir
cd $dir
_tide_decolor (_tide_item_pwd)
_tide_decolor (_tide_pwd)
end
set COLUMNS 80
set -g COLUMNS 80
set -g dist_btwn_sides 80
# Unwritable directories
@ -38,15 +39,15 @@ rm -rf ~/normal
set -l longDir ~/alfa/bravo/charlie/delta/echo/foxtrot/golf/hotel/india/juliett/kilo/lima/mike/november/oscar/papa
mkdir -p $longDir
_pwd "$longDir" # CHECK: ~/a/b/c/d/e/f/g/hotel/india/juliett/kilo/lima/mike/november/oscar/papa
_pwd "$longDir" # CHECK: ~/a/b/c/d/e/foxtrot/golf/hotel/india/juliett/kilo/lima/mike/november/oscar/papa
# Truncate to unique
mkdir -p ~/alfa/bratwurst
_pwd "$longDir" # CHECK: ~/a/brav/c/d/e/f/g/h/india/juliett/kilo/lima/mike/november/oscar/papa
_pwd "$longDir" # CHECK: ~/a/brav/c/d/e/f/golf/hotel/india/juliett/kilo/lima/mike/november/oscar/papa
rm -r ~/alfa/bratwurst
# Markers
mkdir -p ~/alfa/.git
_pwd "$longDir" # CHECK: ~/alfa/b/c/d/e/f/g/h/india/juliett/kilo/lima/mike/november/oscar/papa
_pwd "$longDir" # CHECK: ~/alfa/b/c/d/e/f/golf/hotel/india/juliett/kilo/lima/mike/november/oscar/papa
rm -r ~/alfa