@@ -11,7 +11,7 @@ class TestUnitGetCompWordsByRef(TestUnitBase):
1111 def _test (self , bash , * args , ** kwargs ):
1212 assert_bash_exec (bash , "unset cur prev" )
1313 output = self ._test_unit (
14- "_comp_get_comp_words_by_ref %s cur prev; echo $cur,${prev-}" ,
14+ "_comp_get_words %s cur prev; echo $cur,${prev-}" ,
1515 bash ,
1616 * args ,
1717 ** kwargs ,
@@ -22,7 +22,7 @@ def test_1(self, bash):
2222 assert_bash_exec (
2323 bash ,
2424 "COMP_WORDS=() COMP_CWORD= COMP_POINT= COMP_LINE= "
25- "_comp_get_comp_words_by_ref cur >/dev/null" ,
25+ "_comp_get_words cur >/dev/null" ,
2626 )
2727
2828 def test_2 (self , bash ):
@@ -134,9 +134,9 @@ def test_22(self, bash):
134134 def test_23 (self , bash ):
135135 """a -n|
136136
137- This test makes sure `_comp_get_comp_words_by_ref ' doesn't use
138- `echo' to return its value, because -n might be interpreted by
139- `echo' and thus would not be returned.
137+ This test makes sure `_comp_get_words ' doesn't use `echo' to
138+ return its value, because -n might be interpreted by `echo'
139+ and thus would not be returned.
140140 """
141141 output = self ._test (bash , "(a -n)" , 1 , "a -n" , 4 )
142142 assert output == "-n,a"
@@ -175,7 +175,7 @@ def test_30(self, bash):
175175 """a b| to all vars"""
176176 assert_bash_exec (bash , "unset words cword cur prev" )
177177 output = self ._test_unit (
178- "_comp_get_comp_words_by_ref words cword cur prev%s; "
178+ "_comp_get_words words cword cur prev%s; "
179179 'echo "${words[@]}",$cword,$cur,$prev' ,
180180 bash ,
181181 "(a b)" ,
@@ -189,7 +189,7 @@ def test_31(self, bash):
189189 """a b| to alternate vars"""
190190 assert_bash_exec (bash , "unset words2 cword2 cur2 prev2" )
191191 output = self ._test_unit (
192- "_comp_get_comp_words_by_ref -w words2 -i cword2 -c cur2 -p prev2%s; "
192+ "_comp_get_words -w words2 -i cword2 -c cur2 -p prev2%s; "
193193 'echo $cur2,$prev2,"${words2[@]}",$cword2' ,
194194 bash ,
195195 "(a b)" ,
@@ -204,7 +204,7 @@ def test_32(self, bash):
204204 """a b : c| with wordbreaks -= :"""
205205 assert_bash_exec (bash , "unset words" )
206206 output = self ._test_unit (
207- '_comp_get_comp_words_by_ref -n : words%s; echo "${words[@]}"' ,
207+ '_comp_get_words -n : words%s; echo "${words[@]}"' ,
208208 bash ,
209209 "(a b : c)" ,
210210 3 ,
@@ -217,7 +217,7 @@ def test_33(self, bash):
217217 """a b: c| with wordbreaks -= :"""
218218 assert_bash_exec (bash , "unset words" )
219219 output = self ._test_unit (
220- '_comp_get_comp_words_by_ref -n : words%s; echo "${words[@]}"' ,
220+ '_comp_get_words -n : words%s; echo "${words[@]}"' ,
221221 bash ,
222222 "(a b : c)" ,
223223 3 ,
@@ -230,7 +230,7 @@ def test_34(self, bash):
230230 """a b :c| with wordbreaks -= :"""
231231 assert_bash_exec (bash , "unset words" )
232232 output = self ._test_unit (
233- '_comp_get_comp_words_by_ref -n : words%s; echo "${words[@]}"' ,
233+ '_comp_get_words -n : words%s; echo "${words[@]}"' ,
234234 bash ,
235235 "(a b : c)" ,
236236 3 ,
@@ -243,7 +243,7 @@ def test_35(self, bash):
243243 r"""a b\ :c| with wordbreaks -= :"""
244244 assert_bash_exec (bash , "unset words" )
245245 output = self ._test_unit (
246- '_comp_get_comp_words_by_ref -n : words%s; echo "${words[@]}"' ,
246+ '_comp_get_words -n : words%s; echo "${words[@]}"' ,
247247 bash ,
248248 "(a 'b ' : c)" ,
249249 3 ,
@@ -255,6 +255,6 @@ def test_35(self, bash):
255255 def test_unknown_arg_error (self , bash ):
256256 with pytest .raises (AssertionError ) as ex :
257257 _ = assert_bash_exec (
258- bash , "_comp_get_comp_words_by_ref dummy" , want_output = True
258+ bash , "_comp_get_words dummy" , want_output = True
259259 )
260260 ex .match ("dummy.* unknown argument" )
0 commit comments