diff options
author | Roy Marples <roy@marples.name> | 2008-07-03 12:33:42 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-07-03 12:33:42 +0000 |
commit | aa57dd1ff61c41457cf4e87c71b4822cbb789c42 (patch) | |
tree | f778bcc39d0db948d60047c0d61013059ae02df7 /src/test | |
parent | e0968a1c2e7feda0e6146c1efdc0ec99027ca608 (diff) |
More unit fixes.
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/units/is_older_than | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/test/units/is_older_than b/src/test/units/is_older_than index 209d75d2..494abbc7 100755 --- a/src/test/units/is_older_than +++ b/src/test/units/is_older_than @@ -11,30 +11,29 @@ TMPDIR=tmp-"$(basename "$0")" # the reference file # # EXAMPLE: if is_older_than a.out *.o ; then ... -is_older_than() { +ref_is_older_than() { local x= ref="$1" shift for x; do [ "${x}" -nt "${ref}" ] && return 0 - [ -d "${x}" ] && is_older_than "${ref}" "${x}"/* && return 0 + [ -d "${x}" ] && ref_is_older_than "${ref}" "${x}"/* && return 0 done return 1 } rm -rf "${TMPDIR}" mkdir "${TMPDIR}" -ln -s ../"${RCDIR}"/rc "${TMPDIR}"/is_older_than do_test() { local r1= r2= - is_older_than "$@" + ref_is_older_than "$@" r1=$? - ./"${TMPDIR}"/is_older_than "$@" + is_older_than "$@" r2=$? - [ -n "${VERBOSE}" ] && echo "baselayout = $r1 | OpenRC = $r2" + [ -n "${VERBOSE}" ] && echo "reference = $r1 | OpenRC = $r2" [ $r1 = $r2 ] } |