Port complete_directories test to littlecheck

This commit is contained in:
Fabian Homborg 2020-02-08 09:48:41 +01:00
parent 2fa8ae161a
commit 7c2d7387d0
4 changed files with 27 additions and 35 deletions

View file

@ -1,19 +0,0 @@
cd ..
mkdir -p test/data/abc
mkdir -p test/data/abcd
touch test/data/af
touch test/data/abcdf
mkdir -p test/data/xy
mkdir -p test/data/xyz
touch test/data/xyf
touch test/data/xyzf
echo \# __fish_complete_directories test/z
__fish_complete_directories test/z
echo \# __fish_complete_directories test/d
__fish_complete_directories test/d
echo \# __fish_complete_directories test/data
__fish_complete_directories test/data
echo \# __fish_complete_directories test/data/
__fish_complete_directories test/data/
echo \# __fish_complete_directories test/data/abc
__fish_complete_directories test/data/abc 'abc dirs'

View file

@ -1,16 +0,0 @@
# __fish_complete_directories test/z
# __fish_complete_directories test/d
test/data/ Directory
test/buildroot/ Directory
test/fish_expand_test/ Directory
# __fish_complete_directories test/data
test/data/ Directory
# __fish_complete_directories test/data/
test/data/abc/ Directory
test/data/abcd/ Directory
test/data/fish/ Directory
test/data/xy/ Directory
test/data/xyz/ Directory
# __fish_complete_directories test/data/abc
test/data/abc/ abc dirs
test/data/abcd/ abc dirs

View file

@ -0,0 +1,27 @@
#RUN: %fish %s
cd ..
mkdir -p test/data/abc
mkdir -p test/data/abcd
touch test/data/af
touch test/data/abcdf
mkdir -p test/data/xy
mkdir -p test/data/xyz
touch test/data/xyf
touch test/data/xyzf
__fish_complete_directories test/z
# No match - no output!
__fish_complete_directories test/d
#CHECK: test/data/ Directory
#CHECK: test/buildroot/ Directory
#CHECK: test/fish_expand_test/ Directory
__fish_complete_directories test/data
#CHECK: test/data/ Directory
__fish_complete_directories test/data/
#CHECK: test/data/abc/ Directory
#CHECK: test/data/abcd/ Directory
#CHECK: test/data/fish/ Directory
#CHECK: test/data/xy/ Directory
#CHECK: test/data/xyz/ Directory
__fish_complete_directories test/data/abc 'abc dirs'
#CHECK: test/data/abc/ abc dirs
#CHECK: test/data/abcd/ abc dirs