#!/usr/bin/env python
import os
from coral import kernel as coral

L = coral.Language.__getLanguage__("UML", 1, 4)
m = L.getElement("Model")()
m.name = "foo\nbar"

coral.saveModel("tmp/out.xmi", m)
os.rename("tmp/out.xmi", "tmp/out2.xmi")
m2 = coral.loadModel("tmp/out2.xmi")
print m2.name
assert m2.name == "foo\nbar"
