For debugging Inform 6 games I am using the method of automated replay of recorded commands as described in DM4 §7.1 Debugging verbs for command sequences
I am currently using Frotz on my Linux machine and I am spending a lot of time in the the almost endless loop of running the interpreter, turning the transcript on, replaying a file of recorded commands, exiting the interpreter, analysing the transcript, and finally making modifications to the source code.
Therefore I have been looking for quite a while for a command-line interpreter like Frotz which would enable me to specify a recorded play as input and a transcript file as output something like this:
$ interpreter -r mygame.rec -t mygame.scr mygame.z5
This would then replay the commands and generate the transcript without any interaction from the user.
I am hoping someone can help me to make my debugging loop less tedious.
Not an interpreter but my humble suggestion is eblong.com/zarf/plotex/regtest.html
My regtest script is built for this kind of thing, but it doesn’t solve the interpreter problem – it assumes you already have an interpreter which is built for stream-in stream-out processing.
Frotz can be compiled in this mode (“dumb frotz”). Once compiled this way, you would type
cat mygame.commands | frotz mygame.z5 > mygame.transcript
There’s also bocfel which uses almose exactly the syntax you mentioned:
bocfel -r -R <playback file> -t -T <script file name> <game file>
I use this also for my current I6 project. With each compile three testfiles are automatically executed and compared to assure no solution path was accidentally broken.
Edit: I think frotz didn’t work for me (on Windows7 with a german game file) because of special characters…
Thank you very much for your suggestions.
I have compiled Frotz in “dumb frotz” mode (first I had to replace calls to getline() with frotz_getline() in src/dumb/dumb_input.c). It works but in the transcript output the input commands are not printed (I wonder if this might be a problem with my terminal).
So I went on and installed Bocfel and it seems to work fine!
I’m looking forward to getting this set up with the regression test script eblong.com/zarf/plotex/regtest.html
Apologies for missing an earlier thread with a similar question.
No, that’s just way way it is. (In dumb mode, your terminal properties don’t matter at all. It is a simple text stream in and out.)
Could you use the ‘tee’ program to send the input to the same file, or would that create a problem? Something along the lines of ‘cat commands | tee -a transcript | frotz (options) >> transcript’?