Imported Upstream version 2.27.0
[platform/upstream/git.git] / t / t4124-apply-ws-rule.sh
index 971a5a7..0ca2982 100755 (executable)
@@ -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)