| test_description='diff function context' |
| . "$TEST_DIRECTORY"/diff-lib.sh |
| static int hello_world(void) |
| printf("Hello world.\n"); |
| int main(int argc, char **argv) |
| test_expect_success 'setup' ' |
| grep -v Classic <hello.c >hello.c.new && |
| diff --git a/hello.c b/hello.c |
| @@ -10,8 +10,7 @@ static int a(void) |
| static int hello_world(void) |
| printf("Hello world.\n"); |
| test_expect_success 'diff -U0 -W' ' |
| git diff -U0 -W >actual && |
| compare_diff_patch actual expected |
| diff --git a/hello.c b/hello.c |
| @@ -9,9 +9,8 @@ static int a(void) |
| static int hello_world(void) |
| printf("Hello world.\n"); |
| test_expect_success 'diff -W' ' |
| compare_diff_patch actual expected |