Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: tweaks
Fetching contributors…

Cannot retrieve contributors at this time

executable file 30 lines (24 sloc) 0.435 kb
#!/bin/bash
set -e
: ${RUBY:=ruby}
cycle() {
$RUBY -r ./okjson -e 'print(OkJson.encode(OkJson.decode($stdin.read)))'
}
fs=$*
if test -z "$fs"
then fs=t/*.json
fi
for f in $fs
do
case $f in
t/valid*.json)
echo $f
cycle <$f >/dev/null
diff $f.exp <(cycle <$f 2>/dev/null)
;;
t/invalid*.json)
echo $f
cycle <$f 2>/dev/null && { echo; exit 1; }
;;
esac
done
Jump to Line
Something went wrong with that request. Please try again.