X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4124-apply-ws-rule.sh;h=d0af697aa129466172e27456c597f329f9c4f027;hb=de8c359786ac9ea825eca59403ef15c961e8caae;hp=8d46df6c3abd0643031106dac15758fdbe5f2ccd;hpb=3cc9caadf738c3b2cf7aa46364be173751912a10;p=git.git diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh index 8d46df6c3..d0af697aa 100755 --- a/t/t4124-apply-ws-rule.sh +++ b/t/t4124-apply-ws-rule.sh @@ -330,6 +330,18 @@ test_expect_success 'two missing blank lines at end with --whitespace=fix' ' test_cmp one expect ' +test_expect_success 'missing blank line at end, insert before end, --whitespace=fix' ' + { echo a; echo; } >one && + git add one && + { echo b; echo a; echo; } >one && + cp one expect && + git diff -- one >patch && + echo a >one && + test_must_fail git apply patch && + git apply --whitespace=fix patch && + test_cmp one expect +' + test_expect_success 'shrink file with tons of missing blanks at end of file' ' { echo a; echo b; echo c; } >one && cp one no-blank-lines &&