t / t4000-diff-format.shon commit [PATCH] Kill a bunch of pointer sign warnings for gcc4 (bf0f910)
   1#!/bin/sh
   2#
   3# Copyright (c) 2005 Junio C Hamano
   4#
   5
   6test_description='Test built-in diff output engine.
   7
   8'
   9. ./test-lib.sh
  10
  11echo >path0 'Line 1
  12Line 2
  13line 3'
  14cat path0 >path1
  15chmod +x path1
  16
  17test_expect_success \
  18    'update-cache --add two files with and without +x.' \
  19    'git-update-cache --add path0 path1'
  20
  21mv path0 path0-
  22sed -e 's/line/Line/' <path0- >path0
  23chmod +x path0
  24rm -f path1
  25test_expect_success \
  26    'git-diff-files -p after editing work tree.' \
  27    'git-diff-files -p >current'
  28cat >expected <<\EOF
  29# mode: 100644 100755 path0
  30--- a/path0
  31+++ b/path0
  32@@ -1,3 +1,3 @@
  33 Line 1
  34 Line 2
  35-line 3
  36+Line 3
  37# mode: 100755 . path1
  38--- a/path1
  39+++ /dev/null
  40@@ -1,3 +0,0 @@
  41-Line 1
  42-Line 2
  43-line 3
  44EOF
  45
  46test_expect_success \
  47    'validate git-diff-files -p output.' \
  48    'cmp -s current expected'
  49
  50test_done