[test] Add new CLI testing platform

Adds the new CLI testing platform that I'm proposing.
See the added `README.md` for details.
This commit is contained in:
Nick Terrell
2022-01-27 13:56:59 -08:00
parent f088c430e3
commit f3096ff6d1
37 changed files with 1452 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
source "$COMMON/platform.sh"
MTIME="stat -c %Y"
case "$UNAME" in
Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;;
esac
assertSameMTime() {
MT1=$($MTIME "$1")
MT2=$($MTIME "$2")
echo MTIME $MT1 $MT2
[ "$MT1" = "$MT2" ] || die "mtime on $1 doesn't match mtime on $2 ($MT1 != $MT2)"
}