view tests/test-include.sh @ 31:8b20521fc40f

* Commit old fix (which I hope was correct!) to avoid leaking fds on exceptions * Remove dependency on audioio library
author Chris Cannam
date Fri, 12 Mar 2010 12:08:21 +0000
parents 1141bc562301
children 2633976fbef5
line wrap: on
line source

fail() {
    echo "Test failed: $1"
    exit 1
}

csvcompare() {
    # permit some fuzz in final few digits
    a="$1"
    b="$2"
    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$a" > "${a}__"
    perl -p -e 's/(\d+\.\d{6})\d+/$1/' "$b" > "${b}__"
    cmp -s "${a}__" "${b}__"
    rv=$?
    rm "${a}__" "${b}__"
    return $rv
}