completion: simplify tests using test_completion_long()
No need to duplicate that functionality. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Nov 11, 2012 at 15:35 UTC
a1be444d099d059982dfcc6b58c286591a3322d8
1 file changed
+3
-6
t/t9902-completion.sh
+3
-6
@@ -172,7 +172,7 @@ test_expect_success 'basic' '
172
'
173
174
test_expect_success 'double dash "git" itself' '
175
- sed -e "s/Z$//" >expected <<-\EOF &&
175
+ test_completion_long "git --" <<-\EOF
176
--paginate Z
177
--no-pager Z
178
--git-dir=
@@ -187,11 +187,10 @@ test_expect_success 'double dash "git" itself' '
187
--no-replace-objects Z
188
--help Z
189
EOF
190
- test_completion "git --"
190
'
191
192
test_expect_success 'double dash "git checkout"' '
194
- sed -e "s/Z$//" >expected <<-\EOF &&
193
+ test_completion_long "git checkout --" <<-\EOF
194
--quiet Z
195
--ours Z
196
--theirs Z
@@ -202,17 +201,15 @@ test_expect_success 'double dash "git checkout"' '
201
--orphan Z
202
--patch Z
203
EOF
205
- test_completion "git checkout --"
204
'
205
206
test_expect_success 'general options' '
207
test_completion "git --ver" "--version " &&
208
test_completion "git --hel" "--help " &&
211
- sed -e "s/Z$//" >expected <<-\EOF &&
209
+ test_completion_long "git --exe" <<-\EOF &&
210
--exec-path Z
211
--exec-path=
212
EOF
215
- test_completion "git --exe" &&
213
test_completion "git --htm" "--html-path " &&
214
test_completion "git --pag" "--paginate " &&
215
test_completion "git --no-p" "--no-pager " &&