From 678a2834989c6571e6fae531447f468d9e03970b Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 19 Dec 2014 10:51:13 +0100 Subject: [PATCH] Android: Fix QStandardPaths test QStandardPaths::writableLocation() is documented to return the empty string if no matching writable location can be determined. This is the case for e.g. FontsLocation and ApplicationsLocation on Android. We need to still accept this as a valid response. Change-Id: I2824e9dcfd41b1c24dbf3896b7ae9b5260e9accd Reviewed-by: David Faure Reviewed-by: BogDan Vatra --- tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index a1732a0a79..21e020404b 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -472,7 +472,7 @@ void tst_qstandardpaths::testAllWritableLocations() QString loc = QStandardPaths::writableLocation(location); if (loc.size() > 1) // workaround for unlikely case of locations that return '/' QCOMPARE(loc.endsWith(QLatin1Char('/')), false); - QVERIFY(loc.contains(QLatin1Char('/'))); + QVERIFY(loc.isEmpty() || loc.contains(QLatin1Char('/'))); QVERIFY(!loc.contains(QLatin1Char('\\'))); }