intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Nov 20, 2017 2:53 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Jul 09, 2012 11:18 am 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5486
In my last HL update, I mentioned that I was writing unit tests. This is the script that I whipped up:

http://eblong.com/zarf/plotex/regtest.html

This is similar in concept to I7's skein -- you specify a list of commands and then check the output to make sure it's what you want. However:

- Works with any stdin/stdout IF interpreter.
- The test script is a plain text file.
- Easy to execute one test, a set of tests, or all tests from the command line.
- The output-checking is conservative: you list key phrases to check for, and the script ignores the rest of the output. This works better (for me) for a game in development. For example, you can add objects to a room without causing a test failure on every "look" command.
- You can also specify negative checks (make sure this phrase does *not* occur in the output of the command), and regular-expression checks for the fancy cases.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group