Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 54397c3e99
Fetching contributors…

Cannot retrieve contributors at this time

executable file 29 lines (25 sloc) 0.637 kb
#! /usr/bin/env bash
cd ${0%/*}
# make test output TAP compatible
# http://en.wikipedia.org/wiki/Test_Anything_Protocol
fails=0
tests=`ls invalid/* -1l | wc -l`
echo "1..$tests"
for input in invalid/*
do
let i+=1
if ../JSON.sh < "$input" > /tmp/JSON.sh_outlog 2> /tmp/JSON.sh_errlog
then
echo "not ok $i - cat $input | ../JSON.sh should fail"
#this should be indented with '#' at the start.
echo "OUTPUT WAS >>>"
cat /tmp/JSON.sh_outlog
echo "<<<"
let fails=$fails+1
else
echo "ok $i - $input was rejected"
echo "#" `cat /tmp/JSON.sh_errlog`
fi
done
echo "$fails test(s) failed"
exit $fails
Jump to Line
Something went wrong with that request. Please try again.