Ticket #5410: indented.mos

File indented.mos, 672 bytes (added by Adeel Asghar, 6 years ago)
Line 
1echo(false);
2s1 := "package A
3 package P1
4 model M
5 Real x;
6 end M;
7 end P1;
8end A;";
9loadString(s1, "A.mo");
10getErrorString();
11addComponent(z, Real, A.P1.M);
12getErrorString();
13answer := "package A
14 package P1
15 model M
16 Real x;
17 Real z;
18 end M;
19 end P1;
20end A;";
21s2 := listFile(A);
22print(s2);
23res := diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain);
24print("\n"+res);
25if answer<>res then
26 print("\nFailed:\nGot:\n"+diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain)+"\nExpected:\n"+diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.color));
27end if;