3 test_description='diff --relative tests'
 
   6 test_expect_success 'setup' '
 
   7         git commit --allow-empty -m empty &&
 
  10         echo other content >subdir/file2 &&
 
  18 diff --git a/$expect b/$expect
 
  20 index 0000000..25c05ef
 
  26 test_expect_success "-p $*" "
 
  27         git diff -p $* HEAD^ >actual &&
 
  28         test_cmp expected actual
 
  36  1 files changed, 1 insertions(+), 0 deletions(-)
 
  38 test_expect_success "--stat $*" "
 
  39         git diff --stat $* HEAD^ >actual &&
 
  40         test_cmp expected actual
 
  47 :000000 100644 0000000000000000000000000000000000000000 25c05ef3639d2d270e7fe765a67668f098092bc5 A      $expect
 
  49 test_expect_success "--raw $*" "
 
  50         git diff --no-abbrev --raw $* HEAD^ >actual &&
 
  51         test_cmp expected actual
 
  55 for type in diff stat raw; do
 
  56         check_$type file2 --relative=subdir/
 
  57         check_$type file2 --relative=subdir
 
  58         check_$type dir/file2 --relative=sub