printf_test.ksh revision 598f4ceed9327d2d6c2325dd67cae3aa06f7fea6
#
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
#
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
#
print "TEST STARTING ${1}: ${2}"
}
print "TEST PASS: ${1}"
}
print "TEST FAIL: ${1}: ${2}"
exit -1
}
if [[ $? -ne 0 ]]; then
test_fail $1 "exit failure"
fi
}
if [[ "$2" != "$3" ]]; then
test_fail $1 "compare mismatch, got [$2] expected [$3]"
fi
}
typeset -A tests=()
two
three'
#debug=yes
for i in "${!tests[@]}"; do
t=test_$i
args="${tests[$i][args]}"
test_start $t "${tests[$i][desc]}"
checkrv $t
test_pass $t
done