summaryrefslogtreecommitdiff
path: root/.local/src/blesh/lib/test-complete.sh
diff options
context:
space:
mode:
Diffstat (limited to '.local/src/blesh/lib/test-complete.sh')
-rw-r--r--.local/src/blesh/lib/test-complete.sh28
1 files changed, 0 insertions, 28 deletions
diff --git a/.local/src/blesh/lib/test-complete.sh b/.local/src/blesh/lib/test-complete.sh
deleted file mode 100644
index cd7c0e1..0000000
--- a/.local/src/blesh/lib/test-complete.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-# this script is a part of blesh (https://github.com/akinomyoga/ble.sh) under BSD-3-Clause license
-ble-import lib/core-complete
-ble-import lib/core-test
-ble/test/start-section 'ble/complete' 7
-(
- function _collect {
- local text=${args[1]} p0=0 i out=
- for ((i=0;i<${#ret[@]};i++)); do
- ((p=ret[i]))
- if ((i%2==0)); then
- out=$out${text:p0:p-p0}'['
- else
- out=$out${text:p0:p-p0}']'
- fi
- p0=$p
- done
- ((p0<${#text})) && out=$out${text:p0}
- ret=$out
- }
- ble/test 'args=(akf Makefile 0); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='M[ak]e[f]ile'
- ble/test 'args=(akf Makefile 1); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='Makefile'
- ble/test 'args=(Mkf Makefile 1); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='[M]a[k]e[f]ile'
- ble/test 'args=(Maf Makefile 1); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='[Ma]ke[f]ile'
- ble/test 'args=(Mak Makefile 1); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='[Mak]efile'
- ble/test 'args=(ake Makefile 0); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='M[ake]file'
- ble/test 'args=(afe Makefile 0); ble/complete/candidates/filter:hsubseq/match "${args[@]}"; _collect' ret='M[a]ke[f]il[e]'
-)
-ble/test/end-section