X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fhtmltemplate%2Fmain.cpp;fp=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fhtmltemplate%2Fmain.cpp;h=34d57cbd11065f53e38d5ffeebad1c94344ae44b;hp=0000000000000000000000000000000000000000;hb=a634acadbcf6017474f68a3eaf7cb632660e9e49;hpb=cd122ca8e0d2c0ffc5397e0a813c75d791a7e6e3 diff --git a/src/contrib/libqxt-2007-10-24/tests/web/htmltemplate/main.cpp b/src/contrib/libqxt-2007-10-24/tests/web/htmltemplate/main.cpp new file mode 100644 index 00000000..34d57cbd --- /dev/null +++ b/src/contrib/libqxt-2007-10-24/tests/web/htmltemplate/main.cpp @@ -0,0 +1,32 @@ +#include +#include +#include +class Test: public QObject +{ +Q_OBJECT +private slots: + void simple() + { + QxtHtmlTemplate t; + t.load(""); + t["foo"]="bla"; + QVERIFY(t.render()=="bla"); + } + void surounded() + { + QxtHtmlTemplate t; + t.load("123456789123456789"); + t["foo"]="heyJO"; + QVERIFY(t.render()=="123456789heyJO123456789"); + } + void indented() + { + QxtHtmlTemplate t; + t.load("\n "); + t["foo"]="baz\nbar"; + QVERIFY(t.render()=="\n baz\n bar"); + } +}; + +QTEST_MAIN(Test) +#include "main.moc"