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_*.
--- /dev/null
+#!/bin/sh -eu
+# When invoked, redo-ood must output targets for which a dependency
+# changed.
+
+>all.do printf 'redo-ifchange a
+'
+
+>a.do cat <<EOF
+redo-ifchange b
+printf '0
+'
+EOF
+
+>b printf '1
+'
+
+redo
+<a read -r a1
+<b read -r b1
+
+ood1=$(redo-ood)
+
+>b printf '2
+'
+<b read -r b2
+
+ood2=$(redo-ood)
+
+test 0 -eq "${a1}"
+test 1 -eq "${b1}"
+test 2 -eq "${b2}"
+
+test -z "${ood1}"
+test -n "${ood2}"
+
+. ../stat_inode.rc
+
+inode_a=$(stat_inode a)
+inodes_ood=$(stat_inode "${ood2}")
+
+test "${inode_a}" = "${inodes_ood}"
--- /dev/null
+#!/bin/sh -eu
+# When invoked, redo-ood must output targets for which a dependency
+# changed and targets for which a dependency of a dependency changed.
+
+>all.do printf 'redo-ifchange a
+'
+
+>a.do cat <<EOF
+redo-ifchange b
+printf '0
+'
+EOF
+
+>b.do cat <<EOF
+redo-ifchange c
+printf '1
+'
+EOF
+
+>c printf '2
+'
+
+redo
+<a read -r a1
+<b read -r b1
+<c read -r c1
+
+ood1=$(redo-ood)
+
+>c printf '3
+'
+<c read -r c2
+
+ood2=$(redo-ood)
+
+test 0 -eq "${a1}"
+test 1 -eq "${b1}"
+test 2 -eq "${c1}"
+test 3 -eq "${c2}"
+
+test -z "${ood1}"
+test -n "${ood2}"
+
+. ../stat_inode.rc
+
+inode_a=$(stat_inode a)
+inode_b=$(stat_inode b)
+inodes_ood=$(stat_inode ${ood2})
+
+case "${inodes_ood}" in
+ *"${inode_a}"*)
+ ;;
+ *)
+ exit 1
+ ;;
+esac
+
+case "${inodes_ood}" in
+ *"${inode_b}"*)
+ ;;
+ *)
+ exit 1
+ ;;
+esac
--- /dev/null
+#!/bin/sh -eu
+# When invoked, redo-ood must output targets for which a dependency
+# changed and targets for which a dependency of a dependency changed
+# and targets for which a dependency of a dependency of a dependency
+# changed.
+
+>all.do printf 'redo-ifchange a
+'
+
+>a.do cat <<EOF
+redo-ifchange b
+printf '0
+'
+EOF
+
+>b.do cat <<EOF
+redo-ifchange c
+printf '1
+'
+EOF
+
+>c.do cat <<EOF
+redo-ifchange d
+printf '2
+'
+EOF
+
+>d printf '3
+'
+
+redo
+<a read -r a1
+<b read -r b1
+<c read -r c1
+<d read -r d1
+
+ood1=$(redo-ood)
+
+>d printf '4\n'
+<d read -r d2
+
+ood2=$(redo-ood)
+
+test 0 -eq "${a1}"
+test 1 -eq "${b1}"
+test 2 -eq "${c1}"
+test 3 -eq "${d1}"
+test 4 -eq "${d2}"
+
+test -z "${ood1}"
+test -n "${ood2}"
+
+. ../stat_inode.rc
+
+inode_a=$(stat_inode a)
+inode_b=$(stat_inode b)
+inode_c=$(stat_inode c)
+inodes_ood=$(stat_inode ${ood2})
+
+case "${inodes_ood}" in
+ *"${inode_a}"*)
+ ;;
+ *)
+ exit 1
+ ;;
+esac
+
+case "${inodes_ood}" in
+ *"${inode_b}"*)
+ ;;
+ *)
+ exit 1
+ ;;
+esac
+
+case "${inodes_ood}" in
+ *"${inode_c}"*)
+ ;;
+ *)
+ exit 1
+ ;;
+esac
--- /dev/null
+#!/bin/sh
+
+stat_inode() {
+ perl -le 'foreach (@ARGV) { @s=stat($_); print $s[1] }'
+}
--- /dev/null
+redo-sh.tests/wrapper.rc
\ No newline at end of file
--- /dev/null
+redo-sh.tests/wrapper.rc
\ No newline at end of file
--- /dev/null
+redo-sh.tests/wrapper.rc
\ No newline at end of file