1 | echo(false);
|
---|
2 | s1 := "model M
|
---|
3 | Real r;
|
---|
4 | end M;";
|
---|
5 |
|
---|
6 | s2 := "model M
|
---|
7 | // Linköping
|
---|
8 | Real r;
|
---|
9 | end M;";
|
---|
10 |
|
---|
11 | answer := "model M
|
---|
12 | // Linköping
|
---|
13 | Real r;
|
---|
14 | end M;";
|
---|
15 |
|
---|
16 | res := diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain);
|
---|
17 | if answer<>res then
|
---|
18 | print("\nFailed \n");
|
---|
19 | print("\nStart model:\n\n" + s1 + "\n");
|
---|
20 | print("\nDelete P.Inner+listFile:\n\n" + s2 + "\n");
|
---|
21 | print("\nDiff:\n\n" + diffModelicaFileListings(s1, s2) + "\n");
|
---|
22 | print(getErrorString());
|
---|
23 | writeFile("P.res", res);
|
---|
24 | writeFile("P.expected", answer);
|
---|
25 | print("Wrote to files P.res and P.expected\n");
|
---|
26 | exit(1);
|
---|
27 | end if;
|
---|
28 | print("OK\n");
|
---|