diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-10 09:34:09 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-14 01:15:05 +0000 |
commit | 61929c30fceebdc1813176a3807efb9ca102a01f (patch) | |
tree | 64ae8373a3ff3b2fbb08a1473e303cba4623560d /tests/auto/corelib/io/qurl | |
parent | 35819dc7641067540cafc448632af5603dd887aa (diff) |
tst_QUrl: Add extra testcases
Task-number: QTBUG-44921
Task-number: QTBUG-44920
Change-Id: Iee8cbc07c4434ce9b560ffff13ca303803916c2d
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto/corelib/io/qurl')
-rw-r--r-- | tests/auto/corelib/io/qurl/tst_qurl.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 2015629a59..7579c6713d 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. -** Copyright (C) 2012 Intel Corporation. +** Copyright (C) 2015 Intel Corporation. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -1248,6 +1248,10 @@ void tst_QUrl::fromLocalFile_data() << QString::fromLatin1("/a%25.txt"); QTest::newRow("data10") << QString::fromLatin1("/%80.txt") << QString::fromLatin1("file:///%2580.txt") << QString::fromLatin1("/%80.txt"); + QTest::newRow("data11") << QString::fromLatin1("./a.txt") << QString::fromLatin1("file:a.txt") << QString::fromLatin1("a.txt"); + QTest::newRow("data12") << QString::fromLatin1("././a.txt") << QString::fromLatin1("file:a.txt") << QString::fromLatin1("a.txt"); + QTest::newRow("data13") << QString::fromLatin1("b/../a.txt") << QString::fromLatin1("file:a.txt") << QString::fromLatin1("a.txt"); + QTest::newRow("data14") << QString::fromLatin1("/b/../a.txt") << QString::fromLatin1("file:///a.txt") << QString::fromLatin1("/a.txt"); } void tst_QUrl::fromLocalFile() @@ -2012,6 +2016,11 @@ void tst_QUrl::isValid() QVERIFY(url.toString().isEmpty()); QVERIFY(url.errorString().contains("':' before any '/'")); } + + { + QUrl url("file://./localfile.html"); + QVERIFY(!url.isValid()); + } } void tst_QUrl::schemeValidator_data() |