The following commit has been merged in the master branch:
commit 41ce815827029c1492eb208aa6e6b2aa49caa551
Author: Ville Skyttä <[email protected]>
Date:   Sun May 1 17:33:24 2011 +0300

    testsuite: Add some failing _get_comp_words_by_ref testcases when cursor is 
before first word.

diff --git a/test/unit/_get_comp_words_by_ref.exp 
b/test/unit/_get_comp_words_by_ref.exp
index ad07a65..8244796 100644
--- a/test/unit/_get_comp_words_by_ref.exp
+++ b/test/unit/_get_comp_words_by_ref.exp
@@ -48,6 +48,22 @@ assert_bash_list {" a"} $cmd $test
 sync_after_int
 
 
+set test "|a ";  # | = cursor position
+set cmd {COMP_WORDS=(a); COMP_CWORD=0; COMP_LINE='a '; COMP_POINT=0; 
_get_comp_words_by_ref cur prev; echo "$cur $prev"}
+assert_bash_list {" "} $cmd $test
+
+
+sync_after_int
+
+
+set test " | a ";  # | = cursor position
+set cmd {COMP_WORDS=(a); COMP_CWORD=0; COMP_LINE='  a '; COMP_POINT=1; 
_get_comp_words_by_ref cur prev; echo "$cur $prev"}
+assert_bash_list {" "} $cmd $test
+
+
+sync_after_int
+
+
 set test "a b |";  # | = cursor position
 set cmd {COMP_WORDS=(a b ''); COMP_CWORD=2; COMP_LINE='a b '; COMP_POINT=4; 
_get_comp_words_by_ref cur prev; echo "$cur $prev"}
 assert_bash_list {" b"} $cmd $test

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-commits

Reply via email to