Skip to content

Commit

Permalink
DIRECTOR: Lingo: Execute test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent bb7e9b6 commit 855db11
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
11 changes: 11 additions & 0 deletions engines/director/lingo/lingo.cpp
Expand Up @@ -309,7 +309,18 @@ void Lingo::runTests() {
if (stream) {
uint size = stream->size();

char *script = (char *)calloc(size + 1, 1);

stream->read(script, size);

warning("Executing file %s of size %d", m.getName().c_str(), size);

addCode(script, kMovieScript, counter);
executeScript(kMovieScript, counter);

free(script);

counter++;
}

inFile.close();
Expand Down
13 changes: 0 additions & 13 deletions engines/director/lingo/tests/macros.lingo
Expand Up @@ -40,16 +40,3 @@ end if
put par1
put par2
put par3
", kMovieScript, 1);

_lingo->addCode("check(2, 3)
global x, y
set y = 8
shipx
put x
zipx
put x
put y
check(1, 2, 3)
check 4, 5, 6
check 7, 8
11 changes: 11 additions & 0 deletions engines/director/lingo/tests/macros2.lingo
@@ -0,0 +1,11 @@
check(2, 3)
global x, y
set y = 8
shipx
put x
zipx
put x
put y
check(1, 2, 3)
check 4, 5, 6
check 7, 8

0 comments on commit 855db11

Please sign in to comment.