Skip test for JSON export if not enabled

This commit is contained in:
Martchus 2018-03-04 21:20:13 +01:00
parent 9b708715e9
commit 9c1c038b22
1 changed files with 6 additions and 1 deletions

View File

@ -903,6 +903,9 @@ void CliTests::testFileLayoutOptions()
*/
void CliTests::testJsonExport()
{
#ifndef TAGEDITOR_JSON_EXPORT
cout << "\nSkipping JSON export (feature not enabled)" << endl;
#else
cout << "\nJSON export" << endl;
string stdout, stderr;
@ -911,5 +914,7 @@ void CliTests::testJsonExport()
const char *const args[] = {"tageditor", "export", "--pretty", "-f", file.data(), nullptr};
TESTUTILS_ASSERT_EXEC(args);
CPPUNIT_ASSERT_EQUAL(expectedJson, stdout);
#endif // TAGEDITOR_JSON_EXPORT
}
#endif
#endif // PLATFORM_UNIX