X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft2201-add-update-typechange.sh;h=2e8f70245204bd4dc78e67f227e86838e1cdad5b;hb=801cfae8fd683761ae268cab8cec08e4b0f5a35b;hp=e15e3eb81b11216f87a8010aa11edc0835e29b0f;hpb=547905f8cd2a04b3e1117f00025b60f81aa60f47;p=git.git diff --git a/t/t2201-add-update-typechange.sh b/t/t2201-add-update-typechange.sh index e15e3eb81..2e8f70245 100755 --- a/t/t2201-add-update-typechange.sh +++ b/t/t2201-add-update-typechange.sh @@ -11,7 +11,13 @@ test_expect_success setup ' _empty=$(git hash-object --stdin yomin && >caskly && - ln -s frotz nitfol && + if test_have_prereq SYMLINKS; then + ln -s frotz nitfol && + T_letter=T + else + printf %s frotz > nitfol && + T_letter=M + fi && mkdir rezrov && >rezrov/bozbar && git add caskly xyzzy yomin nitfol rezrov/bozbar && @@ -29,7 +35,11 @@ test_expect_success modify ' >nitfol && # rezrov/bozbar disappears rm -fr rezrov && - ln -s xyzzy rezrov && + if test_have_prereq SYMLINKS; then + ln -s xyzzy rezrov + else + printf %s xyzzy > rezrov + fi && # xyzzy disappears (not a submodule) mkdir xyzzy && echo gnusto >xyzzy/bozbar && @@ -71,7 +81,7 @@ test_expect_success modify ' s/blob/000000/ } / nitfol/{ - s/ nitfol/ $_z40 T&/ + s/ nitfol/ $_z40 $T_letter&/ s/blob/100644/ } / rezrov.bozbar/{ @@ -106,12 +116,12 @@ test_expect_success modify ' test_expect_success diff-files ' git diff-files --raw >actual && - diff -u expect-files actual + test_cmp expect-files actual ' test_expect_success diff-index ' git diff-index --raw HEAD -- >actual && - diff -u expect-index actual + test_cmp expect-index actual ' test_expect_success 'add -u' ' @@ -119,7 +129,7 @@ test_expect_success 'add -u' ' cp -p ".git/index" ".git/saved-index" && git add -u && git ls-files -s >actual && - diff -u expect-final actual + test_cmp expect-final actual ' test_expect_success 'commit -a' ' @@ -130,11 +140,11 @@ test_expect_success 'commit -a' ' fi && git commit -m "second" -a && git ls-files -s >actual && - diff -u expect-final actual && + test_cmp expect-final actual && rm -f .git/index && git read-tree HEAD && git ls-files -s >actual && - diff -u expect-final actual + test_cmp expect-final actual ' test_done