Skip to content

Commit

Permalink
completion: simplify tests using test_completion_long()
Browse files Browse the repository at this point in the history
No need to duplicate that functionality.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Nov 16, 2012
1 parent 43ea081 commit a1be444
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions t/t9902-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ test_expect_success 'basic' '
'

test_expect_success 'double dash "git" itself' '
sed -e "s/Z$//" >expected <<-\EOF &&
test_completion_long "git --" <<-\EOF
--paginate Z
--no-pager Z
--git-dir=
Expand All @@ -187,11 +187,10 @@ test_expect_success 'double dash "git" itself' '
--no-replace-objects Z
--help Z
EOF
test_completion "git --"
'

test_expect_success 'double dash "git checkout"' '
sed -e "s/Z$//" >expected <<-\EOF &&
test_completion_long "git checkout --" <<-\EOF
--quiet Z
--ours Z
--theirs Z
Expand All @@ -202,17 +201,15 @@ test_expect_success 'double dash "git checkout"' '
--orphan Z
--patch Z
EOF
test_completion "git checkout --"
'

test_expect_success 'general options' '
test_completion "git --ver" "--version " &&
test_completion "git --hel" "--help " &&
sed -e "s/Z$//" >expected <<-\EOF &&
test_completion_long "git --exe" <<-\EOF &&
--exec-path Z
--exec-path=
EOF
test_completion "git --exe" &&
test_completion "git --htm" "--html-path " &&
test_completion "git --pag" "--paginate " &&
test_completion "git --no-p" "--no-pager " &&
Expand Down

0 comments on commit a1be444

Please sign in to comment.