From a6080a0a44d5ead84db3dabbbc80e82df838533d Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 7 Jun 2007 00:04:01 -0700 Subject: War on whitespace This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano --- t/t4110-apply-scan.sh | 1 - 1 file changed, 1 deletion(-) (limited to 't/t4110-apply-scan.sh') diff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh index 005f744816..9faef0d66e 100755 --- a/t/t4110-apply-scan.sh +++ b/t/t4110-apply-scan.sh @@ -98,4 +98,3 @@ test_expect_success "S = cmp" \ 'cmp apply.txt patch.txt' test_done - -- cgit v1.2.3 From 5be60078c935ed08ee8eb5a32680bdfb6bb5bdf3 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 2 Jul 2007 22:52:14 -0700 Subject: Rewrite "git-frotz" to "git frotz" This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano --- t/t4110-apply-scan.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't/t4110-apply-scan.sh') diff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh index 9faef0d66e..db60652a37 100755 --- a/t/t4110-apply-scan.sh +++ b/t/t4110-apply-scan.sh @@ -4,7 +4,7 @@ # Copyright (c) 2005 Robert Fitzsimons # -test_description='git-apply test for patches which require scanning forwards and backwards. +test_description='git apply test for patches which require scanning forwards and backwards. ' . ./test-lib.sh @@ -86,8 +86,8 @@ diff --git a/new.txt b/new.txt +c2222 EOF -test_expect_success "S = git-apply scan" \ - 'git-apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch' +test_expect_success "S = git apply scan" \ + 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch' mv new.txt apply.txt test_expect_success "S = patch scan" \ -- cgit v1.2.3 From ac2e28c0a43ced3837fbbcf66fd693244b6c6693 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 20 Jul 2008 01:33:46 -0700 Subject: tests: do not rely on external "patch" Some of our tests assumed a working "patch" command to produce expected results when checking "git-apply", but some systems have broken "patch". We can compare our output with expected output that is precomputed instead to sidestep this issue. Signed-off-by: Junio C Hamano --- t/t4110-apply-scan.sh | 96 +++++---------------------------------------------- 1 file changed, 9 insertions(+), 87 deletions(-) (limited to 't/t4110-apply-scan.sh') diff --git a/t/t4110-apply-scan.sh b/t/t4110-apply-scan.sh index db60652a37..09f58112e0 100755 --- a/t/t4110-apply-scan.sh +++ b/t/t4110-apply-scan.sh @@ -9,92 +9,14 @@ test_description='git apply test for patches which require scanning forwards and ' . ./test-lib.sh -# setup - -cat > patch1.patch <<\EOF -diff --git a/new.txt b/new.txt -new file mode 100644 ---- /dev/null -+++ b/new.txt -@@ -0,0 +1,12 @@ -+a1 -+a11 -+a111 -+a1111 -+b1 -+b11 -+b111 -+b1111 -+c1 -+c11 -+c111 -+c1111 -EOF -cat > patch2.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -1,7 +1,3 @@ --a1 --a11 --a111 --a1111 - b1 - b11 - b111 -EOF -cat > patch3.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -6,6 +6,10 @@ - b11 - b111 - b1111 -+b2 -+b22 -+b222 -+b2222 - c1 - c11 - c111 -EOF -cat > patch4.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -1,3 +1,7 @@ -+a1 -+a11 -+a111 -+a1111 - b1 - b11 - b111 -EOF -cat > patch5.patch <<\EOF -diff --git a/new.txt b/new.txt ---- a/new.txt -+++ b/new.txt -@@ -10,3 +10,7 @@ - c11 - c111 - c1111 -+c2 -+c22 -+c222 -+c2222 -EOF - -test_expect_success "S = git apply scan" \ - 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch' -mv new.txt apply.txt - -test_expect_success "S = patch scan" \ - 'cat patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch | patch' -mv new.txt patch.txt - -test_expect_success "S = cmp" \ - 'cmp apply.txt patch.txt' +test_expect_success 'git apply scan' ' + git apply \ + "$TEST_DIRECTORY/t4110/patch1.patch" \ + "$TEST_DIRECTORY/t4110/patch2.patch" \ + "$TEST_DIRECTORY/t4110/patch3.patch" \ + "$TEST_DIRECTORY/t4110/patch4.patch" \ + "$TEST_DIRECTORY/t4110/patch5.patch" && + test_cmp new.txt "$TEST_DIRECTORY/t4110/expect" +' test_done -- cgit v1.2.3