Skip to content

Commit

Permalink
add test for ticket:3974
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Jun 23, 2016
1 parent f34d8aa commit 611ddae
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions openmodelica/interactive-API/Bug3974.mos
@@ -0,0 +1,40 @@
// name: Bug3974.mos [BUG #3974]
// keywords: check that we generate a file for diffSimulationResultsHtml API
// status: correct
// teardown_command: rm -rf ModelTestBug3974*
//

loadString("
model ModelTestBug3974
parameter Real a = 1;
Real x(start = 0, fixed = true);
equation
der(x) = a * x;
end ModelTestBug3974;
"); getErrorString();
buildModel(ModelTestBug3974); getErrorString();
system("ModelTestBug3974 -r ModelTestBug39741.mat"); getErrorString();
system("ModelTestBug3974 -override a=2 -r ModelTestBug39742.mat"); getErrorString();
writeFile("ModelTestBug3974.html", diffSimulationResultsHtml("x", "ModelTestBug39741.mat", "ModelTestBug39742.mat")); getErrorString();
echo(false);
str := readFile("ModelTestBug3974.html"); getErrorString();
v := regexBool(str, "<(.*)>.*"); getErrorString();
echo(true);
"Do we have <html> inside the read file?";
v;

// Result:
// true
// ""
// {"ModelTestBug3974","ModelTestBug3974_init.xml"}
// ""
// 0
// ""
// 0
// ""
// true
// ""
// true
// "Do we have <html> inside the read file?"
// true
// endResult
1 change: 1 addition & 0 deletions openmodelica/interactive-API/Makefile
Expand Up @@ -12,6 +12,7 @@ Bug3282.mos \
Bug3417.mos \
Bug3520.mos \
Bug3783.mos \
Bug3974.mos \
ConvertUnits.mos \
CopyClass.mos \
choicesAllMatching.mos \
Expand Down

0 comments on commit 611ddae

Please sign in to comment.