aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testcodeinjection.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-08 14:30:13 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-08 16:04:18 -0200
commit20998c0dc9532630ba549af9a8321cd736c79368 (patch)
tree651fe5dc006693c5671f0db7b66476b658f9171e /tests/testcodeinjection.cpp
parenta0c267b10ad01064e9282ea38577cbd71d0944af (diff)
Assumes utf-8 encoding for conversion rules stored in external files.
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/testcodeinjection.cpp')
-rw-r--r--tests/testcodeinjection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testcodeinjection.cpp b/tests/testcodeinjection.cpp
index e3619a202..b056ead83 100644
--- a/tests/testcodeinjection.cpp
+++ b/tests/testcodeinjection.cpp
@@ -34,6 +34,7 @@ void TestCodeInjections::testReadFileUtf8()
QString xmlCode = "\
<typesystem package=\"Foo\"> \
<value-type name='A'> \
+ <conversion-rule file='"+filePath+"/utf8code.txt'/>\
<inject-code class='target' file='"+filePath+"/utf8code.txt' />\
</value-type>\
<value-type name='A::B'/> \
@@ -45,6 +46,8 @@ void TestCodeInjections::testReadFileUtf8()
QString code = classA->typeEntry()->codeSnips().first().code();
QString utf8Data = QString::fromUtf8("\xC3\xA1\xC3\xA9\xC3\xAD\xC3\xB3\xC3\xBA");
QVERIFY(code.indexOf(utf8Data) != -1);
+ code = classA->typeEntry()->conversionRule();
+ QVERIFY(code.indexOf(utf8Data) != -1);
}
QTEST_APPLESS_MAIN(TestCodeInjections)