diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-30 12:20:13 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-09-01 13:05:34 -0700 |
commit | 5b9e2f31bd4bc636cf596ef3375317f33041cad5 (patch) | |
tree | f6c9e519a4fe0478435dc1c967a4ff58442ade6f /tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | |
parent | cda98280edd2ab7b8d6b3dee08281b045c470dc5 (diff) |
tst_QFileInfo::stdfilesystem: add extra Unicode string tests
Pick-to: 6.6
Change-Id: I2b24e1d3cad44897906efffd17803f70bd4d60f6
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp')
-rw-r--r-- | tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index e13b16260e..fc5c8d3526 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -2324,6 +2324,18 @@ void tst_QFileInfo::stdfilesystem() COMPARE_CONSTRUCTION("../file.txt"); COMPARE_CONSTRUCTION("./filæ.txt"); + // Test unicode strings + QCOMPARE(QFileInfo(fs::path(u"./filæ.txt")).absoluteFilePath(), + QFileInfo(u"./filæ.txt"_s).absoluteFilePath()); + QCOMPARE(QFileInfo(base, fs::path(u"./filæ.txt")).absoluteFilePath(), + QFileInfo(base, u"./filæ.txt"_s).absoluteFilePath()); +#ifdef __cpp_char8_t + QCOMPARE(QFileInfo(fs::path(u8"./filæ.txt")).absoluteFilePath(), + QFileInfo(u8"./filæ.txt").absoluteFilePath()); + QCOMPARE(QFileInfo(base, fs::path(u8"./filæ.txt")).absoluteFilePath(), + QFileInfo(base, u8"./filæ.txt").absoluteFilePath()); +#endif + #undef COMPARE_CONSTRUCTION { // One proper comparison with operator== for each ctor |