Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fb589f
commit c985fbe
Showing
6 changed files
with
47 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
// status: correct | ||
|
||
readFile("Tables.expected.mo")==diffModelicaFileListings(readFile("Tables.old.mo"),readFile("Tables.new.mo"),OpenModelica.Scripting.DiffFormat.plain); | ||
echo(false); | ||
old := readFile("Tables.old.mo"); | ||
new := readFile("Tables.new.mo"); | ||
expected := readFile("Tables.expected.mo"); | ||
res := diffModelicaFileListings(old,new,OpenModelica.Scripting.DiffFormat.plain); | ||
|
||
if expected==res then | ||
print("OK\n"); | ||
else | ||
print("Failed; output new file to Tables.wrongexpected.mo\n"); | ||
print(diffModelicaFileListings(res,expected,OpenModelica.Scripting.DiffFormat.color)+"\n"); | ||
writeFile("Tables.wrongexpected.mo", res); | ||
exit(1); | ||
end if; | ||
|
||
// Result: | ||
// true | ||
// OK | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// status: correct | ||
|
||
echo(false); | ||
|
||
a := "model Test | ||
Component component1(x = 5) | ||
annotation(); | ||
end Test;"; | ||
|
||
b := "model Test | ||
Component component1(x = 6) annotation(); | ||
end Test;"; | ||
|
||
echo(true); | ||
diffModelicaFileListings( | ||
a, | ||
b, | ||
OpenModelica.Scripting.DiffFormat.color); | ||
getErrorString(); | ||
|
||
// Result: | ||
// true | ||
// "model Test | ||
// Component component1(x = [9;31m5[0m[4;32m6[0m) | ||
// annotation(); | ||
// end Test;" | ||
// "" | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters