diff --git a/.gitignore b/.gitignore index 9e7cf02..2a1a8aa 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ test.dot *.aux *.toc *.pdf +examples/*.check +examples/*.vcheck test.rtf *.out test.html diff --git a/Makefile b/Makefile index 34a9dd3..e351da0 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ pdf: $(examples:.gamebook=.pdf) html: $(examples:.gamebook=.html) examples/gamebookformatplay.js \ examples/gamebookformat.css debug: $(examples:.gamebook=.debug) +check: $(examples:.gamebook=.check) +vcheck: $(examples:.gamebook=.vcheck) dot: $(examples:.gamebook=.dot) png: $(examples:.gamebook=.png) txt: $(examples:.gamebook=.txt) @@ -39,6 +41,12 @@ examples/gamebookformat.css: gamebookformat.css %.debug: %.gamebook *.py templates/debug/*.debug python2.7 ./buildexamplegamebook.py $< $@ +%.check: %.debug + python2.7 ./checkgamebook.py $< > $@ || true + +%.vcheck: %.debug + python2.7 ./checkgamebook.py -v $< > $@ || true + %.txt: %.gamebook *.py templates/txt/*.txt python2.7 ./buildexamplegamebook.py $< $@ @@ -50,12 +58,12 @@ examples/gamebookformat.css: gamebookformat.css test: unittest checkexpected templatejstest -expected: rtf tex html debug txt dot map +expected: rtf tex html debug txt dot map check vcheck $(RM) expected/* && \ - cp examples/*.{rtf,tex,html,debug,txt,dot,map} \ + cp examples/*.{rtf,tex,html,debug,txt,dot,map,check,vcheck} \ expected -checkexpected: clean rtf tex html debug dot txt +checkexpected: clean rtf tex html debug dot txt check vcheck diff -r -x "*.aux" -x "*.gamebook" -x "*.log" -x "*.out" -x "*.png" \ -x "*.pdf" -x .gitignore -x "*.js" -x "*.css" \ -x "*.options" -q examples expected @@ -80,8 +88,8 @@ templatejstest: clean: $(RM) examples/*rtf examples/*.html examples/*.tex \ - examples/*.txt examples/*.debug examples/*.log \ - examples/*.pdf examples/*.out *~ examples/*~ *.pyc \ + examples/*.txt examples/*.debug examples/*.check examples/*.log \ + examples/*.pdf examples/*.out *~ examples/*~ *.pyc examples/*.vcheck \ examples/*.dot examples/*.aux examples/*.toc $(png) \ $(map) templates/*~ templates/*/*~ \ $(examples:.gamebook=.png) readme.html \ @@ -91,7 +99,7 @@ fixmes: grep FIXME *.py .PHONY: all clean fixmes uploadto expected checkexpected test unittest \ - templatejstest xmllinthtmlbook + templatejstest xmllinthtmlbook check vcheck .PRECIOUS: %.tex %.dot diff --git a/expected/bgg.check b/expected/bgg.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/bgg.vcheck b/expected/bgg.vcheck new file mode 100644 index 0000000..8a7fcc8 --- /dev/null +++ b/expected/bgg.vcheck @@ -0,0 +1 @@ +examples/bgg.debug: ending (death?) section found: end diff --git a/expected/codewords.check b/expected/codewords.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/codewords.vcheck b/expected/codewords.vcheck new file mode 100644 index 0000000..e9bd52e --- /dev/null +++ b/expected/codewords.vcheck @@ -0,0 +1,2 @@ +examples/codewords.debug: ending (death?) section found: the_end +examples/codewords.debug: ending (death?) section found: cheater diff --git a/expected/counters.check b/expected/counters.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/counters.vcheck b/expected/counters.vcheck new file mode 100644 index 0000000..e39c815 --- /dev/null +++ b/expected/counters.vcheck @@ -0,0 +1 @@ +examples/counters.debug: ending (death?) section found: death diff --git a/expected/format.check b/expected/format.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/format.vcheck b/expected/format.vcheck new file mode 100644 index 0000000..779036e --- /dev/null +++ b/expected/format.vcheck @@ -0,0 +1,2 @@ +examples/format.debug: ending (death?) section found: good +examples/format.debug: ending (death?) section found: bad diff --git a/expected/htmlbook.check b/expected/htmlbook.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/htmlbook.vcheck b/expected/htmlbook.vcheck new file mode 100644 index 0000000..6ba92fe --- /dev/null +++ b/expected/htmlbook.vcheck @@ -0,0 +1,2 @@ +examples/htmlbook.debug: ending (death?) section found: second +examples/htmlbook.debug: ending (death?) section found: third diff --git a/expected/items.check b/expected/items.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/items.vcheck b/expected/items.vcheck new file mode 100644 index 0000000..2b59b71 --- /dev/null +++ b/expected/items.vcheck @@ -0,0 +1 @@ +examples/items.debug: ending (death?) section found: won diff --git a/expected/itemslist.check b/expected/itemslist.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/itemslist.vcheck b/expected/itemslist.vcheck new file mode 100644 index 0000000..499a9a3 --- /dev/null +++ b/expected/itemslist.vcheck @@ -0,0 +1 @@ +examples/itemslist.debug: ending (death?) section found: won diff --git a/expected/itemstaglist.check b/expected/itemstaglist.check new file mode 100644 index 0000000..57d8046 --- /dev/null +++ b/expected/itemstaglist.check @@ -0,0 +1 @@ +examples/itemstaglist.debug: No start section found. Cancelling checks. diff --git a/expected/itemstaglist.vcheck b/expected/itemstaglist.vcheck new file mode 100644 index 0000000..57d8046 --- /dev/null +++ b/expected/itemstaglist.vcheck @@ -0,0 +1 @@ +examples/itemstaglist.debug: No start section found. Cancelling checks. diff --git a/expected/letter.check b/expected/letter.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/letter.vcheck b/expected/letter.vcheck new file mode 100644 index 0000000..0f66853 --- /dev/null +++ b/expected/letter.vcheck @@ -0,0 +1 @@ +examples/letter.debug: ending (death?) section found: start diff --git a/expected/references.check b/expected/references.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/references.vcheck b/expected/references.vcheck new file mode 100644 index 0000000..9f22468 --- /dev/null +++ b/expected/references.vcheck @@ -0,0 +1,2 @@ +examples/references.debug: ending (death?) section found: end +examples/references.debug: ending (death?) section found: altend diff --git a/expected/trade.check b/expected/trade.check new file mode 100644 index 0000000..bc01ff3 --- /dev/null +++ b/expected/trade.check @@ -0,0 +1 @@ +examples/trade.debug: Could not reach section 'someotherplace' from start. diff --git a/expected/trade.vcheck b/expected/trade.vcheck new file mode 100644 index 0000000..246887e --- /dev/null +++ b/expected/trade.vcheck @@ -0,0 +1,2 @@ +examples/trade.debug: Could not reach section 'someotherplace' from start. +examples/trade.debug: ending (death?) section found: theend diff --git a/expected/unreachable.check b/expected/unreachable.check new file mode 100644 index 0000000..a093105 --- /dev/null +++ b/expected/unreachable.check @@ -0,0 +1,3 @@ +examples/unreachable.debug: Could not reach section 'nothere' from start. +examples/unreachable.debug: Could not reach section 'nothereeither' from start. +examples/unreachable.debug: Could not reach section 'secondfake' from start. diff --git a/expected/unreachable.vcheck b/expected/unreachable.vcheck new file mode 100644 index 0000000..e3f97b7 --- /dev/null +++ b/expected/unreachable.vcheck @@ -0,0 +1,7 @@ +examples/unreachable.debug: Could not reach section 'nothere' from start. +examples/unreachable.debug: Could not reach section 'nothereeither' from start. +examples/unreachable.debug: Could not reach section 'secondfake' from start. +examples/unreachable.debug: ending (death?) section found: nothere +examples/unreachable.debug: ending (death?) section found: here +examples/unreachable.debug: ending (death?) section found: nothereeither +examples/unreachable.debug: ending (death?) section found: secondfake diff --git a/expected/withdemo.check b/expected/withdemo.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/withdemo.vcheck b/expected/withdemo.vcheck new file mode 100644 index 0000000..f427ace --- /dev/null +++ b/expected/withdemo.vcheck @@ -0,0 +1 @@ +examples/withdemo.debug: ending (death?) section found: theend diff --git a/expected/withmaps.check b/expected/withmaps.check new file mode 100644 index 0000000..e69de29 diff --git a/expected/withmaps.vcheck b/expected/withmaps.vcheck new file mode 100644 index 0000000..de45ce3 --- /dev/null +++ b/expected/withmaps.vcheck @@ -0,0 +1 @@ +examples/withmaps.debug: ending (death?) section found: end diff --git a/expected/withoutdemo.check b/expected/withoutdemo.check new file mode 100644 index 0000000..da76f01 --- /dev/null +++ b/expected/withoutdemo.check @@ -0,0 +1 @@ +examples/withoutdemo.debug: Could not reach section 'demoinfo' from start. diff --git a/expected/withoutdemo.vcheck b/expected/withoutdemo.vcheck new file mode 100644 index 0000000..cb4e290 --- /dev/null +++ b/expected/withoutdemo.vcheck @@ -0,0 +1,3 @@ +examples/withoutdemo.debug: Could not reach section 'demoinfo' from start. +examples/withoutdemo.debug: ending (death?) section found: theend +examples/withoutdemo.debug: ending (death?) section found: altend