From 4a94495f747fef1b32bb8ea3aa8adbe81314795a Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 5 Sep 2022 03:26:33 +0530 Subject: spring cleaning 0.3 --- .local/src/blesh/lib/test-complete.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .local/src/blesh/lib/test-complete.sh (limited to '.local/src/blesh/lib/test-complete.sh') 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 -- cgit v1.2.3