From 7a5adf67655b54a0ea43b641dfbd0924b06d214a Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 13 Oct 2010 17:40:03 +0100 Subject: Create regression test for QFileInfo("").exists() File engine refactor caused a regression in QTextDocument, due to a QFileInfo constructed with an empty string returning true from exists() Added a test case to QFileInfo to catch this at the correct level. Reviewed-By: joao --- tests/auto/qfileinfo/tst_qfileinfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index d2019b1..cd1a597 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -412,6 +412,7 @@ void tst_QFileInfo::exists_data() QTest::newRow("data9") << SRCDIR "resources/file?.ext1" << false; QTest::newRow("data10") << "." << true; QTest::newRow("data11") << ". " << false; + QTest::newRow("empty") << "" << false; QTest::newRow("simple dir") << SRCDIR "resources" << true; QTest::newRow("simple dir with slash") << SRCDIR "resources/" << true; -- cgit v0.12