Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: > In testing, a common paradigm involves checking the expected output > with the actual output: test-lib provides a test_cmp to show the diff > between the two outputs. So, use this function in preference to > calling a human over to compare command outputs by eye. > > Helped-by: Jonathan Nieder <jrnieder@xxxxxxxxx> > Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx> > --- > t/t1006-cat-file.sh | 119 ++++++++++++++++++++++++--------------------------- > 1 files changed, 56 insertions(+), 63 deletions(-) > > diff --git a/t/t1006-cat-file.sh b/t/t1006-cat-file.sh > index d8b7f2f..5be3ce9 100755 > --- a/t/t1006-cat-file.sh > +++ b/t/t1006-cat-file.sh > @@ -144,10 +119,13 @@ tag_size=$(strlen "$tag_content") > > run_tests 'tag' $tag_sha1 $tag_size "$tag_content" "$tag_pretty_content" 1 > > -test_expect_success \ > - "Reach a blob from a tag pointing to it" \ > - "test '$hello_content' = \"\$(git cat-file blob $tag_sha1)\"" > +test_expect_success "Reach a blob from a tag pointing to it" ' > + echo_without_newline "$hello_content" >expect && > + git cat-file blob "$tag_sha1" >actual && > + test_cmp expect actual > +' > > +test_done > for batch in batch batch-check > do > for opt in t s e p What is that test_done about? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html