Ticket #3658: TestDiff.mos

File TestDiff.mos, 622 bytes (added by sjoelund.se, 9 years ago)
Line 
1echo(false);
2s1 := "model    M
3  Real r;
4end M;";
5
6s2 := "model M
7  // Linköping
8  Real r;
9end M;";
10
11answer := "model   M
12  // Linköping
13  Real r;
14end M;";
15
16res := diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain);
17if 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);
27end if;
28print("OK\n");