| 1 | echo(false); | 
|---|
| 2 | s1 := "model M1 | 
|---|
| 3 | A a(abc = 23) annotation(Placement(visible = true, transformation(origin={10,30},    extent = {{-30, -30}, {30, 30}}, rotation = 180))); | 
|---|
| 4 | end M1;"; | 
|---|
| 5 | loadString(s1, "M1.mo"); | 
|---|
| 6 | getErrorString(); | 
|---|
| 7 | removeComponentModifiers(M1, "a"); | 
|---|
| 8 | getErrorString(); | 
|---|
| 9 | answer := "model M1 | 
|---|
| 10 | A a annotation(Placement(visible = true, transformation(origin={10,30},    extent = {{-30, -30}, {30, 30}}, rotation = 180))); | 
|---|
| 11 | end M1;"; | 
|---|
| 12 | s2 := listFile(M1); | 
|---|
| 13 | print(s2); | 
|---|
| 14 | if answer<>diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain) then | 
|---|
| 15 | print("\nFailed \n"); | 
|---|
| 16 | print("\nStart model:\n\n" + s1 + "\n"); | 
|---|
| 17 | print("\nremoveComponentModifiers + listFile:\n\n" + s2 + "\n"); | 
|---|
| 18 | print("\nDiff:\n\n" + diffModelicaFileListings(s1, s2) + "\n"); | 
|---|
| 19 | print(getErrorString()); | 
|---|
| 20 | end if; | 
|---|