Skip to content

Commit

Permalink
Added test for ticket #3380
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Aug 3, 2015
1 parent 8d8255a commit 4db7025
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions openmodelica/interactive-API/Makefile
Expand Up @@ -44,6 +44,7 @@ refactorGraphAnn2.mos \
regex.mos \
Rename.mos \
RunScript.mos \
saveShort.mos \
saveTotalModel.mos \
setComponentComment.mos \
setComponentModifierValue.mos \
Expand Down
23 changes: 23 additions & 0 deletions openmodelica/interactive-API/saveShort.mos
@@ -0,0 +1,23 @@
// status: correct

loadString("package Test
model Testa
replaceable function func = Functiona;
end Testa;
end Test;");
if regularFileExists("func.mo") then remove("func.mo") else true;
setSourceFile(Test.Testa.func, "func.mo");
save(Test.Testa.func);getErrorString();
readFile("func.mo");getErrorString();

// Result:
// true
// true
// true
// true
// ""
// "within Test.Testa;
//
// function func = Functiona;"
// ""
// endResult

0 comments on commit 4db7025

Please sign in to comment.