summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
Commit message (Collapse)AuthorAgeFilesLines
* Add copyright and licensing to tools and utils files missing itLucie Gérard2 days1-0/+2
| | | | | | Task-number: QTBUG-124453 Change-Id: I7645bcd7a7559425659bc522530a25977d7b5c82 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QResourceEngine: move the resource path to the end in the row labelThiago Macieira3 days1-24/+24
| | | | | | | | | Otherwise, it's impossible to select those rows in the command-line, because they start with a colon. Change-Id: I6979d02a7395405cbf23fffd17c98f455a4cbdaa Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* QResource: obey the MapPrivateOption option to provide RW memoryThiago Macieira3 days2-4/+25
| | | | | | | | | | | | | | | | | | | | | The documentation says: The mapping will have the same open mode as the file (read and/or write), except when using MapPrivateOption, in which case it is always possible to write to the mapped memory. So obey it. This may cause high memory use by copying data we already have. This may be important because applications may want to memory-map resources which they intentionally didn't compress because those resources are large. Later commits will implement some workarounds. Fixes: QTBUG-124608 Pick-to: 6.7 6.6 6.5 Change-Id: I6979d02a7395405cbf23fffd17c8f03baf0ec00d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: Add qurl autotestEven Oscar Andersen6 days1-5/+21
| | | | | | | | The testThreading test was deadlocking due to waiting for threads to start. Rewritten the wait to use a QEventLoop Change-Id: If1a864c054c1de1239694b201a4cf0e8186fc1d0 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QSaveFile: don't reset fileEngine after commit()David Faure9 days1-0/+24
| | | | | | | | | | | [ChangeLog][QtCore][QSaveFile] Member functions such as fileTime() and size() now continue to work after commit(). Fixes: QTBUG-66605 Fixes: QTBUG-77039 Change-Id: I0b17eae9493911d1a0828b589d762bd8eb344bce Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QTest: rip out qxp::function_ref from compare_helper()Thiago Macieira9 days1-2/+5
| | | | | | | | | | | | | | | | [ChangeLog][QtTest] The QCOMPARE_xx macros can now only find QTest::toString() expansions that are either found via Argument Dependent Lookup on the type in question or are an instatiation of the QTest::toString<T>() template. This matches the behavior of the QCOMPARE() macro. This changes the way how the toString() overloads are selected, so we need to explicilty constraint the main QTest::toString() template in order to pick the free functions when they exist. Change-Id: Ie28eadac333c4bcd8c08fffd17c54e768c5cffd0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* wasm: qabstractfileengine test fails on wasm/windowsEven Oscar Andersen14 days1-2/+2
| | | | | | | | | | | The test assumes either windows or unix line endings, however wasm can run on either system, causing problem with git config core.autocrlf=true Fix the test so that on wasm we correct filesize if necessary Change-Id: Ieb86c5388aa931d8ca06822e1c09a2c55801de67 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QProcess: fix startCommand() with whitespace-only stringsThiago Macieira2024-04-191-0/+20
| | | | | | | | | | | | | | We'd end up trying to takeFirst() from an empty QStringList. [ChangeLog][QtCore][QProcess] Fixed a bug that would cause startCommand() to crash if passed a string that was empty or contained only whitespace characters. Fixes: QTBUG-124512 Pick-to: 6.5 6.6 6.7 Change-Id: I455fe22ef4ad4b2f9b01fffd17c7689095c39272 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QSaveFile: unittests: use strlen() instead of hardcoded numbersAhmad Samir2024-04-201-9/+14
| | | | | | | | DRY with respect to string literals. Change-Id: I606a4cbd502efb0f0f7d12176f4253fb2cd5eaa4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Disable copy and move of QAbstractFileEngineHandlerEdward Welbourne2024-04-194-0/+23
| | | | | | | | | | | | They're not wanted and Axivion (SV71) grumbles about the lack of copy and move operators and constructors otherwise. Do the same in all derived classes. Some of these needed their default constructors made overt as a result. Similar for QAbstractFileEngineHandlerList. Task-number: QTBUG-122619 Change-Id: Iff016940f8c4884bd65dd781354b9bcda9b7cdd8 Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* wasm: Enable fileselector testEven Oscar Andersen2024-04-186-1/+5
| | | | | | | Also add test files for emscripten platform to build Change-Id: Ief03e44a4e3f3339a65453469a7ae0a6969f2252 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* tst_qstandardpaths: check the return value of QFile::openAhmad Samir2024-04-131-17/+30
| | | | | | | | | If QFile::open() fails in any of the these helper functions, the test should fail. Task-number: QTBUG-123623 Change-Id: I3e4d65eccd3be32eed673d9607ef468ddc0fd6e5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* wasm: Add auto test for qfileEven Oscar Andersen2024-04-131-19/+39
| | | | | | | | | | | | | | Problems: * mmap of size 0 works, add test in QFSFileEnginePrivate::map to make sure wasm platform behaves as the other platforms * qwe// is a valid filename on wasm, QSKIP test * applicationFilePath does not exist on wasm. * /dev/zero does not exist on wasm, file bug, skip test * blocking pipes do not exist on wasm, QSKIP test * socketpair does not exist on wasm, QSKIP test Change-Id: I1705c543782cbcb92a7ebed2fc2792613524c686 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Tests: make some QFile::open calls failGiuseppe D'Angelo2024-04-132-4/+8
| | | | | | | | | | In some cases calls to QFile::open are made outside of a testfunction (so we can't use QVERIFY), or even in standalone executables that are executed by tests. Make them fail "visibly". Change-Id: Iec4d56f6d874be16aa2e9ad6974eeec2a98caa3f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Tests: check the output of QFile::openGiuseppe D'Angelo2024-03-278-38/+38
| | | | | | | | | | Wrap the call in QVERIFY. tst_QTextStream::read0d0d0a was also faulty as it *never* opened the file because of a broken path. Fix it with QFINDTESTDATA. Change-Id: I61a8f83beddf098d37fda13cb3bfb4aaa4913fc5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: remove member FileTime and use QFile::FileTimeAhmad Samir2024-03-211-5/+5
| | | | | | | | | This is probably a remnant from when QAbstractFileEngine was public API since it's been changed to private API, just use QFile::FileTime. Pick-to: 6.7 Change-Id: I60d3d4ff811f95434b81d5ca115f5d43cfff8b15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QFileSystemEngine: make factory functions return unique_ptr<QABFE>Ahmad Samir2024-03-214-26/+34
| | | | | | | | | | | | | | | | This makes the ownership of the returned pointer clearer. It also matches reality, some call sites were already storing the pointer in a unique_ptr. Also shorten the function name to "createLegacyEngine", you have to read its docs anyway to figure out what it does. Drive-by changes: less magic numbers; use sliced(); return nullptr instead of `0`. Change-Id: I637759b4160b28b15adf5f6548de336887338dab Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* tst_qdir: optimize setPath() testAhmad Samir2024-03-211-0/+1
| | | | | | | | | | | | | | | | | On Linux "../" is /tmp, which is more likely to cause issues with the dir.entrylist() below used in that test; /tmp could have a lot of temporary files, any of them can be gone in a jiffy. Noticed this test occasionally falking out when running tests in parallel (`ctest -R "foo|bar" -j3`). This may be an unintentional side effect of b3e9e80719f5a69c8f28f6eceaadbbdd7f1f5fe5, which changed the code to use a temporary dir for testing instead of creating/deleting dirs in the source dir ("../" from the source dir has a more stable entries count than /tmp). Change-Id: I98da86223792bc9f34c173fc02cc84049ed699ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qtemporarydir: refactor a testAhmad Samir2024-03-211-6/+8
| | | | | | | | | | | | | | Instead of using ~/Downloads, which we have no control over (OK for the CI, but not locally), create a parent temp dir, then another temp dir inside it. Also rename it to nestedTempDirs, the issue from the bug report wasn't tested because it relied on a dir being created, then failing to set permissions on it. The code has changed a lot since then. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I2b03d5d761117aaf436041c13c0dc394b106bf89 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngineIterator: add `bool advance()` virtual methodAhmad Samir2024-03-201-10/+11
| | | | | | | | | | | | | | | | | | | | | | | And remove hasNext/next() methods. This remodels QAFEI to be like QFileSystemIterator. This better fits the logic in the newly added QDirListing class (which uses STL-style iterators). QFSFileEngineIterator: Initialize the internal nativeIterator in the constructor; also replace the advance() private method with an override for the advance() method inherited from the base class. QResourceFileEngineIterator: Override currentFileInfo(), with a QResouces the QFileInfo is created on demand if/when this method is called. This is the backend/private API, and QDirListing is the public API that can be used in a ranged-for to iterate over directory entries. Change-Id: I93eb7bdd64823ac01eea2dcaaa6bcc8ad868b2c4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_qdir: don't use the source dir for testingAhmad Samir2024-03-191-5/+25
| | | | | | | | | | | | Copy test dirs from the source dir to a QTemporaryDir, this way each run starts with a clean slate. Also on some setups the source dir could be read-only. Task-number: QTBUG-117449 Change-Id: Iea5fd661b66dd3cbae0b663bb504b14c8ccbe491 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* wasm: Add qdiriterator test + minor runtime fixesEven Oscar Andersen2024-03-191-4/+12
| | | | | | | | | There was a runtime feilure in that we try to create directories until it fails. This does not fail on wasm so added a hardlimit of 20480 Change-Id: I6ef65f7be277fc8775879733f969d2ce008a439a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QAbstractFileEngine: add a path parameter to beginEntryList()Ahmad Samir2024-03-173-6/+6
| | | | | | | | | | | | | Change beginEntryList() to take a path parameter, which it passes on to the QAFEIterator constructor; setting the path at construction makes more sense, because typically the path isn't supposed to change during iteration, and this simplifies the code at the call site. Remove setPath(), the last usage in Qt repos was in QtCreator, and that has been ported away from it. Change-Id: I01baa688e0f9b582aacb63d7d98a794276e58034 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QAbstractFileEngine: make {begin,end}EntryList() return a unique_ptrAhmad Samir2024-03-173-6/+9
| | | | | | | | Makes ownership clearer. Change-Id: Ibb57ca900ef30b16d48964a977e997ba6705248b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDir{Iterator,Listing}: fix unittestAhmad Samir2024-03-162-12/+12
| | | | | | | | | | | | QEXTRACTTESTDATA returns a QSharedPointer<QTemporaryDir>, so the member variable has to be of that type so that all code paths work. Amends 986b5b4f47cdac71bb66784abc50d4fff695984d (QDirIterator) and c39a0d1e8956e042139ce3065681e4c5d07412f3 (QDirListing). Change-Id: Ie4b76687125f0506a2c899acca222123f0b1c44a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: Add corelib/io/largefileEven Oscar Andersen2024-03-161-5/+10
| | | | | | | | | | | The test does not run just like that it is necessary to: set maxSizeBits to 28 mapOffsetOverflow: Settings copied from Linux Change-Id: Idc276a7e2d777a9a6ad0c0e90d729fb4646a38b6 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QProcess/Unix: fix close() on invalid file descriptorThiago Macieira2024-03-121-5/+20
| | | | | | | | | | | | | | | | Commit 90bc0ad41f9937f9cba801b3166635f6f55e0678 ("QProcess/Unix: add failChildProcessModifier()") added this line that set childStartedPipe so that the failChildProcess() callback had something to write to. But we left it set on exit from QProcessPrivate::startDetached(), which caused the QProcess destructor to try and close it. Noticed when debugging the issue for QTBUG-123083. Pick-to: 6.7 6.7.0 Task-number: QTBUG-123083 Change-Id: I6818d78a57394e37857bfffd17bbc41c8400270f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_QStorageInfo: try harder to make the free space changeThiago Macieira2024-03-121-57/+71
| | | | | | | | | | | | | | | | This merges the tempFile and caching tests, which had been updated in commit ae03ffaffdcc8b2a0589b846e16ad016691dec29 to attempt other filesystems than APFS and btrfs. Instead of adding yet another item to the list (xfs), let's insist by writing more and flushing the OS buffers. Local testing says that btrfs usually updates after the first write(), no later than the second, and that APFS and XFS "just works" now (without the fsync() even). Pick-to: 6.7 Fixes: QTBUG-123151 Change-Id: I6818d78a57394e37857bfffd17bbe7427307efc4 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* tst_qfile: fix GCC 13.2.1 compiler warning [-Wenum-compare]Ahmad Samir2024-03-121-3/+2
| | | | | | | | | | | | | | | | | By using "wt" for all OS's; according to Thiago the 't' is ignored everywhere except on Windows. tests/auto/corelib/io/qfile/tst_qfile.cpp:2846:70: warning: comparison between ‘enum QOperatingSystemVersionBase::OSType’ and ‘enum QOperatingSystemVersion::OSType’ [-Wenum-compare] 2846 | const char *openMode = QOperatingSystemVersion::current().type() != QOperatingSystemVersion::Windows | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Amends 3446313c7a5cd6005089866a7b20c9f28e132a0a Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I310d7d6ce3833756ffdc47b000e052ef3afdfdef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrl: Use new comparison helper macrosRym Bouabid2024-03-061-8/+16
| | | | | | | | | | | | | | | | The class had operator==(), operator!=() and operator <() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with hidden friends. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QUrl. Task-number: QTBUG-120303 Change-Id: Ic4fa2335292cc4b75ad2373832c0b89d768f529c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct license for filesLucie Gérard2024-03-051-1/+1
| | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Task-number: QTBUG-121787 Change-Id: Iee9f4fca676e77ab9d8ed485a28ce5ea8803be15 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Add QDirListing, an STL-style iterator for directory entriesAhmad Samir2024-02-294-130/+105
| | | | | | | | | | | | | | | | | | | | | | | | This class offers a forward-only const_iterator, that matches the system low-level functions' logic (e.g. readdir()/dirstream logic). This iterator is a std::input_iterator_tag. QDirIterator uses Java-style iterators that have a couple of issues: - They don't fit the logic of the underlying native system functions (readdir()/__dirstream and co.), there is no way to know if there is a next entry except by advancing the iterator (calling readdir()) first - As a consequence of the above, two QFileInfo objects, current and next, had to be used to fit that paradigm; and the code always iterated/stat'ed an extra entry past the one we want, e.g. when filtering The next step is porting QAbstractFileEngineIterator and its subclasses to be like QFileSystemIterator, i.e. replace hasNext()/next() with a `bool advance()` virtual method. This is easier to reason about than the Java-style iterators, and is more in-line with the new class. Discussed-on: https://lists.qt-project.org/pipermail/development/2023-December/044745.html Change-Id: I8e696cefdca18d8c78f803efdb83a73dd43eb720 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Copy QDirIterator.{cpp,h} to QDirListing.{cpp,h}Ahmad Samir2024-02-294-0/+678
| | | | | | | To make it easier to follow the history in git. Change-Id: I094056c1ec130aeef77aa2d20289ab766bc25083 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QUrlQuery: Use new comparison helper macrosRym Bouabid2024-02-232-6/+54
| | | | | | | | | | | | | | | QUrlQuery had operator==() and operator!=() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with a hidden friend. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QUrlQuery. Task-number: QTBUG-120303 Change-Id: I083487a134887010ebbb78906d2c1982f2ad41b5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QStorageInfo: Use new comparison helper macrosRym Bouabid2024-02-221-5/+12
| | | | | | | | | | | | | | Replace operator==() and operator!=() private friends with comparesEqual(). Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QStorageInfo. Task-number: QTBUG-120303 Change-Id: I6434dc8382f6554b9e60840bac4abaeb95b70db6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QProcessEnvironment: Use new comparison helper macrosRym Bouabid2024-02-222-6/+13
| | | | | | | | | | | | | | | QProcessEnvironment had operator==() and operator!=() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with a hidden friend. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Use new \compares command in the documentation to describe the comparison operators provided by QProcessEnvironment. Task-number: QTBUG-120303 Change-Id: I4c57f6cfb9589e82a37eea6993e079212b34cecd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QDir: Use QT_TEST_EQUALITY_OPS macro in unit-testsRym Bouabid2024-02-151-6/+2
| | | | | | | | | | Replace QTestPrivate::testEqualityOperators() helper function with QT_TEST_EQUALITY_OPS macro to get a reasonable debug output in case of failure. Task-number: QTBUG-120303 Change-Id: I1ca23cabfe62ab78e012cf95fd2add631fc88a64 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QFileInfo: Use new comparison helper macrosRym Bouabid2024-02-142-1/+9
| | | | | | | | | | | | QFileInfo had operator==() and operator!=() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with a hidden friend. Use QT_TEST_ALL_EQUALITY_OPS macro in unit-tests. Task-number: QTBUG-120303 Change-Id: Ie290df230b0f608a0965dccba9184382291cad8e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QFilesystemWatcher: speed up the unittestsAhmad Samir2024-02-141-26/+43
| | | | | | | | | | | | | | | | | | | The only backend that requires longer wait times is QPollingFileSystemWatcherEngine; lower the interval of the polling engine for the unittests (using the same objectName() trick that is used to force using a specific watcher engine). Remove the comment about FAT32 filesystems, there is no where on the CI where this test fails so far. Before: Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 127027ms After: Totals: 23 passed, 0 failed, 0 skipped, 0 blacklisted, 666ms Change-Id: I96378f810463fa5c4ebdc13946ea23810e80f144 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDir: Use new comparison helper macrosRym Bouabid2024-02-132-6/+15
| | | | | | | | | | | | QDir had operator==() and operator!=() defined as public member functions, so use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of these methods and replace them with a hidden friend. Use QTestPrivate::testEqualityOperators() helper function in unit-tests. Task-number: QTBUG-120303 Change-Id: I86c2ba18b8b114efd9f62fc2fd628bc9065b04b2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QUrl IDNA: Update to Unicode 15.1Ievgenii Meshcheriakov2024-02-082-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Unicode 15.1 (more spcifically UTS #46, revision 31) changes how host names are processed. The initial Unicode host name mapping is done without validity checking. That check was used in the past to mark QUrl's invalid. This patch inserts simplified validity check later. This check is similar to one performed before conversion to unicode, but does not include BiDi check to keep names starting with xn-- valid. Additional complication is that U+1E9E LATIN CAPITAL LETTER SHARP S must be mapped to "ss" with transitional processing. It is not possible anymore to predict whether Qt implementation considers a URL valid by using only error codes in the tests vectors file. The test was adjusted to expect an empty string (indicating invalid QUrl) or string matching the entry in vectors file if there are any processing errors specified for that entry. Unblacklist tst_QUrlUts46::idnaTestV2. Task-number: QTBUG-121529 Change-Id: Iad5dadd1a6695fa54b432e35000b350cd6e06341 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* unicode: Import version 15.1 (UCD version 32)Ievgenii Meshcheriakov2024-02-082-3008/+3041
| | | | | | | | | | | | | | | | | | | | | | Add enumerator for the new Unicode version to QChar::UnicodeVersion. Remap new line breaking classes to their Unicode 15.0 values: * AK, AP and AS to AL, * VI and VF to CM. These are classes for new line breaking support for Indic scripts that require more work. Blacklist failing tests for now: * tst_QUrlUts46::idnaTestV2 * tst_QTextBoundaryFinder::lineBoundariesDefault * tst_QTextBoundaryFinder::graphemeBoundariesDefault Regenerate the source files. Task-number: QTBUG-121529 Change-Id: I869cc9fbaa53765d8ae6265c22cdbef9f19d05bf Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* tst_qdiriterator: add a test for QFsFileEngineIteratorAhmad Samir2024-02-041-0/+34
| | | | | | | | As a baseline for subsequent commits. Change-Id: Ifac026848e92817b08a75ceafee6d06e0a8f399d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change license for tests filesLucie Gérard2024-02-0466-66/+66
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QDirIterator: don't create test dirs/files in the source dirAhmad Samir2024-02-011-33/+10
| | | | | | | | | | | | | | | | This is cleaner as the test dirs/files are created in a QTemporaryDir that is cleaned up automatically, so less manual cleanup in the unittest. This also fixes issues for build environments where the source dir is read-only. entrylist dir in the source dir is only needed for the construction of the QResource in the CMakeLists.txt. Task-number: QTBUG-117449 Change-Id: I3e6389ff730c3a617854e85318f80838e012f2c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qdiriterator: cleanupAhmad Samir2024-01-311-5/+8
| | | | | | | | | | | - Match QCOMPARE logic when printing stringlists that don't match, it's "actual" then "expected" - Use row tag names that don't interfere with the shell; e.g. using `tst_qdiriterator iterateResouce:':/testdata'` doesn't work for some reason, so just add a qrc prefix Change-Id: I3d556b83ec34f2dab15ea3178273af10fb2c62e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add VxWorks to skip condition when utimensat function is requiredKrzysztof Sommerfeld2024-01-241-1/+1
| | | | | | | VxWorks does not implement utimensat function Change-Id: I4c507b76636c912c8b6161292f73e020b29da49b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QProcess: align treatment of early start errorsThiago Macieira2024-01-221-3/+87
| | | | | | | | | | | | | | | | There are a couple of possible runtime errors that could happen before the state was changed to QProcess::Starting. This aligns the Unix code with Windows, which has the state transition at the top, and with the documentation which says we will enter QProcess::Starting state. Complements commit 956b2495285251e4840ec32885ffa2cfbb7bd79c, repeating what it did for Unix (removing the overwriting of the error message that openChannel() sets) on Windows. We also need to ensure cleanup() is always called. Pick-to: 6.6 6.7 Change-Id: I76ffba14ece04f24b43efffd17aafdd47f908bf1 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QProcess: use enum types in tests instead of plain intAhmad Samir2024-01-221-28/+27
| | | | | | Pick-to: 6.7 Change-Id: Ibba85d28c2a5329f9224ffdc893f2dab8e672ee9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>