Re: [PATCH 2/4] t4011: illustrate "diff-index -p" on stat-dirty paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
  '
--
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


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]