t / t4028-format-patch-mime-headers.shon commit cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch (f8adbec)
   1#!/bin/sh
   2
   3test_description='format-patch mime headers and extra headers do not conflict'
   4. ./test-lib.sh
   5
   6test_expect_success 'create commit with utf-8 body' '
   7        echo content >file &&
   8        git add file &&
   9        git commit -m one &&
  10        echo more >>file &&
  11        git commit -a -m "two
  12
  13        utf-8 body: ñ"
  14'
  15
  16test_expect_success 'patch has mime headers' '
  17        rm -f 0001-two.patch &&
  18        git format-patch HEAD^ &&
  19        grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
  20'
  21
  22test_expect_success 'patch has mime and extra headers' '
  23        rm -f 0001-two.patch &&
  24        git config format.headers "x-foo: bar" &&
  25        git format-patch HEAD^ &&
  26        grep -i "x-foo: bar" 0001-two.patch &&
  27        grep -i "content-type: text/plain; charset=utf-8" 0001-two.patch
  28'
  29
  30test_done