Improved testing of ginsu

This commit is contained in:
Jeremy Ruston 2011-11-26 12:51:56 +00:00
parent 54ad1984b2
commit a52fd57e88
1 changed files with 10 additions and 5 deletions

15
test.sh
View File

@ -10,9 +10,14 @@ cook $PWD/test/data/tiddlywiki.com/index.html.recipe -d $PWD -o tmp/oldcooked.ht
node cook.js $PWD/test/data/tiddlywiki.com/index.html.recipe > tmp/newcooked.html || exit 1
# compare the two
opendiff tmp/oldcooked.html tmp/newcooked.html
#opendiff tmp/oldcooked.html tmp/newcooked.html
# split the newly cooked tiddlywiki into tiddlers
mkdir -p tmp/tiddlers
rm -f tmp/tiddlers/*
node ginsu.js tmp/newcooked.html tmp/tiddlers
# split the newly cooked tiddlywiki into tiddlers, first with the new ginsu
mkdir -p tmp/newtiddlers
rm -f tmp/newtiddlers/*
node ginsu.js tmp/newcooked.html tmp/newtiddlers
# and now cook them with the old
rm -r tmp/oldtiddlers
ginsu tmp/oldcooked
mv oldcooked.html.0 tmp/oldtiddlers/