1
0
Fork 0
mirror of https://github.com/Oreolek/gamebookformat.git synced 2024-05-05 02:28:19 +03:00

Tests to check output of checkgamebook.py.

Make-rules for checking with and without verbose flag for all example files.
Generated .check and .vcheck files are compared to known ok versions in expected dir.
This commit is contained in:
Pelle Nilsson 2014-09-23 23:51:51 +02:00
parent 444bed78a9
commit 43b6e93ea6
32 changed files with 50 additions and 6 deletions

2
.gitignore vendored
View file

@ -7,6 +7,8 @@ test.dot
*.aux
*.toc
*.pdf
examples/*.check
examples/*.vcheck
test.rtf
*.out
test.html

View file

@ -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

0
expected/bgg.check Normal file
View file

1
expected/bgg.vcheck Normal file
View file

@ -0,0 +1 @@
examples/bgg.debug: ending (death?) section found: end

0
expected/codewords.check Normal file
View file

View file

@ -0,0 +1,2 @@
examples/codewords.debug: ending (death?) section found: the_end
examples/codewords.debug: ending (death?) section found: cheater

0
expected/counters.check Normal file
View file

1
expected/counters.vcheck Normal file
View file

@ -0,0 +1 @@
examples/counters.debug: ending (death?) section found: death

0
expected/format.check Normal file
View file

2
expected/format.vcheck Normal file
View file

@ -0,0 +1,2 @@
examples/format.debug: ending (death?) section found: good
examples/format.debug: ending (death?) section found: bad

0
expected/htmlbook.check Normal file
View file

2
expected/htmlbook.vcheck Normal file
View file

@ -0,0 +1,2 @@
examples/htmlbook.debug: ending (death?) section found: second
examples/htmlbook.debug: ending (death?) section found: third

0
expected/items.check Normal file
View file

1
expected/items.vcheck Normal file
View file

@ -0,0 +1 @@
examples/items.debug: ending (death?) section found: won

0
expected/itemslist.check Normal file
View file

View file

@ -0,0 +1 @@
examples/itemslist.debug: ending (death?) section found: won

View file

@ -0,0 +1 @@
examples/itemstaglist.debug: No start section found. Cancelling checks.

View file

@ -0,0 +1 @@
examples/itemstaglist.debug: No start section found. Cancelling checks.

0
expected/letter.check Normal file
View file

1
expected/letter.vcheck Normal file
View file

@ -0,0 +1 @@
examples/letter.debug: ending (death?) section found: start

View file

View file

@ -0,0 +1,2 @@
examples/references.debug: ending (death?) section found: end
examples/references.debug: ending (death?) section found: altend

1
expected/trade.check Normal file
View file

@ -0,0 +1 @@
examples/trade.debug: Could not reach section 'someotherplace' from start.

2
expected/trade.vcheck Normal file
View file

@ -0,0 +1,2 @@
examples/trade.debug: Could not reach section 'someotherplace' from start.
examples/trade.debug: ending (death?) section found: theend

View file

@ -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.

View file

@ -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

0
expected/withdemo.check Normal file
View file

1
expected/withdemo.vcheck Normal file
View file

@ -0,0 +1 @@
examples/withdemo.debug: ending (death?) section found: theend

0
expected/withmaps.check Normal file
View file

1
expected/withmaps.vcheck Normal file
View file

@ -0,0 +1 @@
examples/withmaps.debug: ending (death?) section found: end

View file

@ -0,0 +1 @@
examples/withoutdemo.debug: Could not reach section 'demoinfo' from start.

View file

@ -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