From: Phillip Wood Date: Fri, 18 Jan 2019 11:23:18 GMT Subject: Re: [PATCH v2 6/7] t3701-add-interactive: test add_i_show_help() Message-ID: <78b5a684-0963-0ca0-78fa-87bc4b18b3a6@talktalk.net> In-Reply-To: <2b4714b8d04f98a6d35f3f4f15881406fa87c320.1547797620.git.gitgitgadget@gmail.com> Hi Slavica Thanks for moving this up, it's really good to add the test before the conversion to C. Best Wishes Phillip On 18/01/2019 07:47, Slavica Djukic via GitGitGadget wrote: > From: Slavica Djukic > > Add test to t3701-add-interactive to verify that add_i_show_help() > outputs expected content. > Also, add it before changing git-add--interactive.perl's help_cmd > to demonstrate that there are no changes introduced by the > conversion to C. > Prefix git add -i call with GIT_PAGER_IN_USE=true TERM=vt100 > to force colored output on Windows. > > Signed-off-by: Slavica Djukic > --- > t/t3701-add-interactive.sh | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh > index 65dfbc033a..14e3286995 100755 > --- a/t/t3701-add-interactive.sh > +++ b/t/t3701-add-interactive.sh > @@ -639,4 +639,28 @@ test_expect_success 'add -p patch editing works with pathological context lines' > test_cmp expected-2 actual > ' > > +test_expect_success 'show help from add--helper' ' > + git reset --hard && > + cat >expect <<-\EOF && > + > + *** Commands *** > + 1: status 2: update 3: revert 4: add untracked > + 5: patch 6: diff 7: quit 8: help > + What now> status - show paths with changes > + update - add working tree state to the staged set of changes > + revert - revert staged set of changes back to the HEAD version > + patch - pick hunks and update selectively > + diff - view diff between HEAD and index > + add untracked - add contents of untracked files to the staged set of changes > + *** Commands *** > + 1: status 2: update 3: revert 4: add untracked > + 5: patch 6: diff 7: quit 8: help > + What now> > + Bye. > + EOF > + test_write_lines h | GIT_PAGER_IN_USE=true TERM=vt100 git add -i >actual.colored && > + test_decode_color actual && > + test_i18ncmp expect actual > +' > + > test_done >