summaryrefslogtreecommitdiff
path: root/regress/tools/files/tests.subr
blob: aefdd9ea6ca79822eab884d8cc0807ca941bafda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# $NetBSD: tests.subr,v 1.3 2019/03/22 20:56:16 rillig Exp $
#

# usage: testcase_start <testname>
testcase_start() {
	printf "  Running testcase %s\\n" "$1"
}

# usage: assert_equal <testname> <expected> <got>
assert_equal() {
	[ "x$2" = "x$3" ] && return 0
	printf "error: assert_equal failed for %s:\nexpected: %s\nbut got:  %s\n" "$1" "$2" "$3" 1>&2
	return 1
}