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.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index 971a5a7512..0ca29821ec 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -52,6 +52,13 @@ test_fix () {
# find touched lines
$DIFF file target | sed -n -e "s/^> //p" >fixed
+ # busybox's diff(1) doesn't output normal format
+ if ! test -s fixed
+ then
+ $DIFF -u file target |
+ grep -v '^+++ target' |
+ sed -ne "/^+/s/+//p" >fixed
+ fi
# the changed lines are all expected to change
fixed_cnt=$(wc -l <fixed)