3 test_description
='patience diff algorithm'
14 for(i
= 0; i
< 10; i
++)
16 printf("Your answer is: ");
30 int main
(int argc
, char
**argv
)
43 return fib
(n-1
) + fib
(n-2
);
52 for(i
= 0; i
< 10; i
++)
58 int main
(int argc
, char
**argv
)
65 diff --git a
/file1 b
/file2
66 index
6faa5a3..e3af329
100644
76 + return fib
(n-1
) + fib
(n-2
);
85 for(i
= 0; i
< 10; i
++)
87 - printf("Your answer is: ");
96 - return fact
(n-1
) * n
;
101 int main
(int argc
, char
**argv
)
103 - frobnitz
(fact
(10));
108 test_expect_success
'patience diff' '
110 test_must_fail git diff --no-index --patience file1 file2 > output &&
111 test_cmp expect output
115 test_expect_success
'patience diff output is valid' '
118 git apply < output &&
119 test_cmp expect file2
142 diff --git a
/uniq1 b
/uniq2
143 index b414108.
.0fdf397
100644
161 test_expect_success
'completely different files' '
163 test_must_fail git diff --no-index --patience uniq1 uniq2 > output &&
164 test_cmp expect output