From: Zbigniew Jędrzejewski-Szmek Date: Thu, 01 Mar 2012 10:05:49 GMT Subject: Re: [PATCH 2/4] t4011: illustrate "diff-index -p" on stat-dirty paths Message-ID: <4F4F49FD.3090504@in.waw.pl> In-Reply-To: <1330568057-27304-3-git-send-email-gitster@pobox.com> On 03/01/2012 03:14 AM, Junio C Hamano wrote: > -test_expect_success SYMLINKS 'diff unchanged symlink' ' > +test_expect_success SYMLINKS 'diff unchanged symlink and file' ' > tree=$(git write-tree)&& > - git update-index frotz&& > + git update-index frotz nitfol&& > test -z "$(git diff-index --name-only $tree)" > ' Hi, why modify and extend an existing test instead of adding a new separate one? I think the test-suite should be getting more unittest-y, ie. checking minimal aspects of functionality, not less. Zbyszek > -test_expect_success SYMLINKS 'diff removed symlink' ' > +test_expect_success SYMLINKS 'diff removed symlink and file' ' > cat>expected<<-\EOF&& > diff --git a/frotz b/frotz > deleted file mode 120000 > @@ -44,22 +52,39 @@ test_expect_success SYMLINKS 'diff removed symlink' ' > @@ -1 +0,0 @@ > -xyzzy > \ No newline at end of file > + diff --git a/nitfol b/nitfol > + deleted file mode 100644 > + index 7c465af..0000000 > + --- a/nitfol > + +++ /dev/null > + @@ -1 +0,0 @@ > + -xyzzy > EOF > mv frotz frotz2&& > + mv nitfol nitfol2&& > git diff-index -M -p $tree>current&& > compare_diff_patch expected current > '