1 # Helpers shared by the test scripts for diff algorithms (patience,
12 for(i = 0; i < 10; i++)
14 printf("Your answer is: ");
28 int main(int argc, char **argv)
41 return fib(n-1) + fib(n-2);
50 for(i = 0; i < 10; i++)
56 int main(int argc, char **argv)
63 diff --git a/file1 b/file2
64 index 6faa5a3..e3af329 100644
74 + return fib(n-1) + fib(n-2);
83 for(i = 0; i < 10; i++)
85 - printf("Your answer is: ");
94 - return fact(n-1) * n;
99 int main(int argc, char **argv)
101 - frobnitz(fact(10));
108 test_expect_success "$STRATEGY diff" '
109 test_must_fail git diff --no-index "--$STRATEGY" file1 file2 > output &&
110 test_cmp expect output
113 test_expect_success "$STRATEGY diff output is valid" '
115 git apply < output &&
116 test_cmp expect file2
140 diff --git a/uniq1 b/uniq2
141 index b414108..0fdf397 100644
161 test_expect_success 'completely different files' '
162 test_must_fail git diff --no-index "--$STRATEGY" uniq1 uniq2 > output &&
163 test_cmp expect output