]>
Dogcows Code - chaz/yoink/blob - yajl/test/run_tests.sh
4 if [[ `uname` == *W32
* ]] ; then
8 # find test binary on both platforms. allow the caller to force a
9 # particular test binary (useful for non-cmake build systems).
10 if [ -z "$testBin" ]; then
11 testBin
="../build/test/Debug/yajl_test.exe"
12 if [[ ! -x $testBin ]] ; then
13 testBin
="../build/test/yajl_test"
14 if [[ ! -x $testBin ]] ; then
15 echo "cannot execute test binary: '$testBin'"
21 echo "using test binary: $testBin"
26 for file in cases
/*.json
; do
29 # if the filename starts with dc_, we disallow comments for this test
30 if [[ $(basename $file) == dc_
* ]] ; then
33 echo -n " test case: '$file': "
37 # parse with a read buffer size ranging from 1-31 to stress stream parsing
38 while (( $iter < 32 )) && [ $success == "success" ] ; do
39 $testBin $allowComments -b $iter < $file > ${file}.
test 2>&1
40 diff ${DIFF_FLAGS} ${file}.gold
${file}.
test
41 if [[ $?
== 0 ]] ; then
42 if (( $iter == 31 )) ; then let testsSucceeded
+=1 ; fi
55 echo $testsSucceeded/$testsTotal tests successful
57 if [[ $testsSucceeded != $testsTotal ]] ; then
This page took 0.036173 seconds and 5 git commands to generate.