Ideally the tests wouldn't touch the default data directory. Both the core unit tests and the functional tests do this correctly. However,  `src/qt/test/test_bitcoin-qt` seems to create an empty `~/.bitcoin` directory if it doesn't exist yet.
Instead, it should set up a temporary data directory like the other tests.
QVERIFY(result == "[\"\"]");
    xecuteCommandLine(result, "rpcNestedTest '' abc");
    QVERIFY(result == "[\"\",\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest abc '' abc");
    QVERIFY(result == "[\"abc\",\"\",\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest abc  abc");
    QVERIFY(result == "[\"abc\",\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest abc\t\tabc");
    QVERIFY(result == "[\"abc\",\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest(abc )");
    QVERIFY(result == "[\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest( abc )");
    QVERIFY(result == "[\"abc\"]");
    xecuteCommandLine(result, "rpcNestedTest(   abc   ,   cba )");
    QVERIFY(result == "[\"abc\",\"cba\"]");
#if QT_VERSION >= 0x050300
    // do the _THROWN checks only with Qt5.3 and higher (_THROWN was introduced in Qt5.3)
    _THROWN(xecuteCommandLine(result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
    _THROWN(xecuteCommandLine(result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
    (xecuteCommandLine(result, "getblockchaininfo(")); //tolerate non closing brackets if we have no arguments
    (xecuteCommandLine(result, "getblockchaininfo()()()")); //tolerate non command brackts
    _THROWN(xecuteCommandLine(result, "getblockchaininfo(True)"), UniValue); //invalid argument
    _THROWN(xecuteCommandLine(result, "a(getblockchaininfo(True))"), UniValue); //method not found
    _THROWN(xecuteCommandLine(result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tollerate empty arguments when using ,
    _THROWN(xecuteCommandLine(result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tollerate empty arguments when using ,
    _THROWN(xecuteCommandLine(result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tollerate empty arguments when using ,
#endif
    fs::remove_all(fs::path(path));
}