blob: b83c2e7f45ebb69e1ddd32c2665fe57add4b99e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
#
# Copyright (c) 2009 Petri Lehtinen <petri@digip.org>
#
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.
TESTFILES="${srcdir}/testdata/invalid ${srcdir}/testdata/invalid-strip ${srcdir}/testdata/invalid-unicode"
run_test() {
local prog=$1
local prefix=$2
run_testprog $prog $prefix
if ! cmp $prefix.out $prefix.$prog.stderr >/dev/null; then
echo >&2
echo "### $prefix ($prog) failed:" >&2
cat $prefix.in >&2
echo "### expected output:" >&2
cat $prefix.out >&2
echo "### actual output:" >&2
cat $prefix.$prog.stderr >&2
exit 1
fi
}
. ${srcdir}/run-test
|