[Scummvm-git-logs] scummvm master -> 259a7bc3e05c5e1e63545879e80cf940f2b04739
sev-
sev at scummvm.org
Fri Apr 17 21:24:23 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
259a7bc3e0 DIRECTOR:LINGO: implements run only one lingo test
Commit: 259a7bc3e05c5e1e63545879e80cf940f2b04739
https://github.com/scummvm/scummvm/commit/259a7bc3e05c5e1e63545879e80cf940f2b04739
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-04-17T23:24:19+02:00
Commit Message:
DIRECTOR:LINGO: implements run only one lingo test
Lingo tests can be run with:
`./scummvm -d11 -p engines/director/lingo/tests/ directortest`
This runs all the .lingo files in that directory to run in sequence.
When one script fails, the others won't run.
With this commit it's now possible to use the commandline option `--start-movie=` to run a specific lingo script.
`start-movie` already made it possible to run a specific director
movie.
The following command will only run the `c2.lingo` file.
`./scummvm -d11 -p engines/director/lingo/tests/ --start-movie=c2.lingo directortest`
Changed paths:
engines/director/lingo/lingo.cpp
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index a28a1108c3..564d9ce08b 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -21,6 +21,7 @@
*/
#include "common/file.h"
+#include "common/config-manager.h"
#include "common/str-array.h"
#include "director/director.h"
@@ -615,13 +616,18 @@ void Lingo::runTests() {
SearchMan.listMatchingMembers(fsList, "*.lingo");
Common::StringArray fileList;
- int counter = 1;
-
- for (Common::ArchiveMemberList::iterator it = fsList.begin(); it != fsList.end(); ++it)
- fileList.push_back((*it)->getName());
+ // Repurpose commandline option --start-movie to run a specific lingo script.
+ if (ConfMan.hasKey("start_movie")) {
+ fileList.push_back(ConfMan.get("start_movie"));
+ } else {
+ for (Common::ArchiveMemberList::iterator it = fsList.begin(); it != fsList.end(); ++it)
+ fileList.push_back((*it)->getName());
+ }
Common::sort(fileList.begin(), fileList.end());
+ int counter = 1;
+
for (uint i = 0; i < fileList.size(); i++) {
Common::SeekableReadStream *const stream = SearchMan.createReadStreamForMember(fileList[i]);
if (stream) {
More information about the Scummvm-git-logs
mailing list