Merge branch 'js/mingw-create-hard-link'
[gitweb.git] / t / t4015-diff-whitespace.sh
index 41facf7abf9bff5cc39419b41998836018257f79..a9fb226c5ad566095163c5141a4ca591f2aeacb1 100755 (executable)
@@ -93,21 +93,20 @@ test_expect_success 'another test, without options' '
        git diff >out &&
        test_cmp expect out &&
 
-       >expect &&
        git diff -w >out &&
-       test_cmp expect out &&
+       test_must_be_empty out &&
 
        git diff -w -b >out &&
-       test_cmp expect out &&
+       test_must_be_empty out &&
 
        git diff -w --ignore-space-at-eol >out &&
-       test_cmp expect out &&
+       test_must_be_empty out &&
 
        git diff -w -b --ignore-space-at-eol >out &&
-       test_cmp expect out &&
+       test_must_be_empty out &&
 
        git diff -w --ignore-cr-at-eol >out &&
-       test_cmp expect out &&
+       test_must_be_empty out &&
 
        tr "Q_" "\015 " <<-\EOF >expect &&
        diff --git a/x b/x
@@ -182,8 +181,7 @@ test_expect_success 'ignore-blank-lines: only new lines' '
        test_seq 5 | sed "/3/i\\
 " >x &&
        git diff --ignore-blank-lines >out &&
-       >expect &&
-       test_cmp expect out
+       test_must_be_empty out
 '
 
 test_expect_success 'ignore-blank-lines: only new lines with space' '
@@ -192,8 +190,7 @@ test_expect_success 'ignore-blank-lines: only new lines with space' '
        test_seq 5 | sed "/3/i\\
  " >x &&
        git diff -w --ignore-blank-lines >out &&
-       >expect &&
-       test_cmp expect out
+       test_must_be_empty out
 '
 
 test_expect_success 'ignore-blank-lines: after change' '
@@ -779,8 +776,6 @@ test_expect_success 'checkdiff allows new blank lines' '
        git diff --check
 '
 
-cat <<EOF >expect
-EOF
 test_expect_success 'whitespace-only changes not reported' '
        git reset --hard &&
        echo >x "hello world" &&
@@ -788,7 +783,7 @@ test_expect_success 'whitespace-only changes not reported' '
        git commit -m "hello 1" &&
        echo >x "hello  world" &&
        git diff -b >actual &&
-       test_cmp expect actual
+       test_must_be_empty actual
 '
 
 cat <<EOF >expect
@@ -1305,7 +1300,7 @@ test_expect_success 'detect blocks of moved code' '
 
 '
 
-test_expect_success 'detect permutations inside moved code -- dimmed_zebra' '
+test_expect_success 'detect permutations inside moved code -- dimmed-zebra' '
        # reuse setup from test before!
        test_config color.diff.oldMoved "magenta" &&
        test_config color.diff.newMoved "cyan" &&
@@ -1315,7 +1310,7 @@ test_expect_success 'detect permutations inside moved code -- dimmed_zebra' '
        test_config color.diff.newMovedDimmed "normal cyan" &&
        test_config color.diff.oldMovedAlternativeDimmed "normal blue" &&
        test_config color.diff.newMovedAlternativeDimmed "normal yellow" &&
-       git diff HEAD --no-renames --color-moved=dimmed_zebra --color >actual.raw &&
+       git diff HEAD --no-renames --color-moved=dimmed-zebra --color >actual.raw &&
        grep -v "index" actual.raw | test_decode_color >actual &&
        cat <<-\EOF >expected &&
        <BOLD>diff --git a/lines.txt b/lines.txt<RESET>