summaryrefslogtreecommitdiff
path: root/t/t4124-apply-ws-rule.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t4124-apply-ws-rule.sh')
-rwxr-xr-xt/t4124-apply-ws-rule.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 6f6ee88..5d0c598 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -47,7 +47,7 @@ test_fix () {
# find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed
- # the changed lines are all expeced to change
+ # the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed)
case "$1" in
'') expect_cnt=$fixed_cnt ;;
@@ -486,4 +486,30 @@ test_expect_success 'same, but with CR-LF line endings && cr-at-eol unset' '
test_cmp one expect
'
+test_expect_success 'whitespace=fix to expand' '
+ qz_to_tab_space >preimage <<-\EOF &&
+ QQa
+ QQb
+ QQc
+ ZZZZZZZZZZZZZZZZd
+ QQe
+ QQf
+ QQg
+ EOF
+ qz_to_tab_space >patch <<-\EOF &&
+ diff --git a/preimage b/preimage
+ --- a/preimage
+ +++ b/preimage
+ @@ -1,7 +1,6 @@
+ QQa
+ QQb
+ QQc
+ -QQd
+ QQe
+ QQf
+ QQg
+ EOF
+ git -c core.whitespace=tab-in-indent apply --whitespace=fix patch
+'
+
test_done