|
|
|
|
@ -28,6 +28,7 @@ class I18nTest : public CppUnit::TestFixture |
|
|
|
|
CPPUNIT_TEST(testMissing); |
|
|
|
|
CPPUNIT_TEST(testOrder); |
|
|
|
|
CPPUNIT_TEST(testLatexString); |
|
|
|
|
CPPUNIT_TEST(test3); |
|
|
|
|
|
|
|
|
|
CPPUNIT_TEST_SUITE_END(); |
|
|
|
|
|
|
|
|
|
@ -80,6 +81,14 @@ public: |
|
|
|
|
string command = FS(FORMAT_STR("{1} -m 0 \"\\png\\usepackage{{color}}\\color{{{2}}}\\dpi{{{3}}}\\normalsize {4}\" -o {5}") % "abc" % "red" % 45 % "asdf" % "asdf.png"); |
|
|
|
|
CPPUNIT_ASSERT_EQUAL(std::string("abc -m 0 \"\\png\\usepackage{color}\\color{red}\\dpi{45}\\normalsize asdf\" -o asdf.png"), command); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void test3() |
|
|
|
|
{ |
|
|
|
|
string msg = FS(FORMAT_STR(" of {1}{2}") % 5 % 6); |
|
|
|
|
CPPUNIT_ASSERT_EQUAL(std::string(" of 56"), msg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// Registers the fixture into the 'registry'
|
|
|
|
|
|