Allow passing directories to prompt_pwd

This allows us to test it without cd-ing about the place.
This commit is contained in:
Fabian Homborg
2021-04-11 21:44:44 +02:00
parent 7a8feb4656
commit af2952dd2f
2 changed files with 35 additions and 17 deletions

13
tests/checks/prompt.fish Normal file
View File

@@ -0,0 +1,13 @@
#RUN: %fish %s
prompt_pwd -d 1 /foo/bar/baz
# CHECK: /f/b/baz
prompt_pwd /usr/share/fish/tools/web_config/sample_prompts
# CHECK: /u/s/f/t/w/sample_prompts
prompt_pwd -D 2 /usr/share/fish/tools/web_config/sample_prompts
# CHECK: /u/s/f/t/web_config/sample_prompts
prompt_pwd -D 0 /usr/share/fish/tools/web_config/sample_prompts
# CHECK: /u/s/f/t/w/sample_prompts