From: Sergey Matveev Date: Mon, 21 Jun 2021 12:33:06 +0000 (+0300) Subject: Add redo-ood related redo.sh-tests/ood_* unittests X-Git-Tag: v1.5.0~4 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=5dfe4d08937cc9cb2f39558359ea4df2f1e830b0 Add redo-ood related redo.sh-tests/ood_* unittests --- diff --git a/t/redo-sh.tests/README b/t/redo-sh.tests/README index 08b4ae8..336d2a1 100644 --- a/t/redo-sh.tests/README +++ b/t/redo-sh.tests/README @@ -1,3 +1,4 @@ Those tests are taken from http://news.dieweltistgarnichtso.net/bin.git. Test parallel_2 removed, because goredo has no --jobs. Test always_rebuild_1 removed, because always-target is rebuilt once per run. +stat call is replaced with portable perl script invocation in ood_*. diff --git a/t/redo-sh.tests/ood_1/test b/t/redo-sh.tests/ood_1/test new file mode 100755 index 0000000..15a14dc --- /dev/null +++ b/t/redo-sh.tests/ood_1/test @@ -0,0 +1,41 @@ +#!/bin/sh -eu +# When invoked, redo-ood must output targets for which a dependency +# changed. + +>all.do printf 'redo-ifchange a +' + +>a.do cat <b printf '1 +' + +redo +b printf '2 +' +all.do printf 'redo-ifchange a +' + +>a.do cat <b.do cat <c printf '2 +' + +redo +c printf '3 +' +all.do printf 'redo-ifchange a +' + +>a.do cat <b.do cat <c.do cat <d printf '3 +' + +redo +d printf '4\n' +