testing: check symlink() result (FDO #79316)

The Cmdline.cpp unit tests did not check the symlink() result,
causing a warning resp. error depending on the configure options.

Reported by Emiliano Heyns.
This commit is contained in:
Patrick Ohly 2014-07-22 04:59:25 -07:00
parent eaeb528896
commit 38d6498e4e
1 changed files with 1 additions and 1 deletions

View File

@ -3123,7 +3123,7 @@ protected:
void testPrintFileTemplatesConfig() {
// simulate reading templates from user's XDG HOME
symlink("../templates", (m_testDir + "/syncevolution-templates").c_str());
CPPUNIT_ASSERT(!symlink("../templates", (m_testDir + "/syncevolution-templates").c_str()));
ScopedEnvChange templates("SYNCEVOLUTION_TEMPLATE_DIR", "/dev/null");
ScopedEnvChange xdg("XDG_CONFIG_HOME", m_testDir);
ScopedEnvChange home("HOME", m_testDir);