test-lib: Work around incompatible sort and find on Windows

If the PATH lists the Windows system directories before the MSYS
directories, Windows's own incompatible sort and find commands would be
picked up. We implement these commands as functions and call the real
tools by absolute path.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
maint
Johannes Sixt 2009-03-11 21:17:26 +01:00
parent a8cbc9ab02
commit f17e9fbbe9
1 changed files with 13 additions and 0 deletions

View File

@ -635,3 +635,16 @@ do
test_done
esac
done

# Fix some commands on Windows
case $(uname -s) in
*MINGW*)
# Windows has its own (incompatible) sort and find
sort () {
/usr/bin/sort "$@"
}
find () {
/usr/bin/find "$@"
}
;;
esac