diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-08 14:30:13 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-02-08 16:04:18 -0200 |
commit | 20998c0dc9532630ba549af9a8321cd736c79368 (patch) | |
tree | 651fe5dc006693c5671f0db7b66476b658f9171e /tests/testcodeinjection.cpp | |
parent | a0c267b10ad01064e9282ea38577cbd71d0944af (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.cpp | 3 |
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) |