From 1cc0c1c985de83fc7dccb05d1b9733910ff34b38 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Mon, 31 May 2021 19:15:10 +0200 Subject: [PATCH] Added more UTF-8 path tests (fnfp & fbnfp). Added more UTF-8 path tests (find_name_from_path & find_base_name_from_path). --- src/xenia/base/testing/utf8_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xenia/base/testing/utf8_test.cc b/src/xenia/base/testing/utf8_test.cc index 37255549d..356f8ad0f 100644 --- a/src/xenia/base/testing/utf8_test.cc +++ b/src/xenia/base/testing/utf8_test.cc @@ -390,6 +390,12 @@ TEST_CASE("UTF-8 Find Name From Path", "[utf8]") { TEST_PATH(utf8::find_name_from_path, "/", ""); TEST_PATH(utf8::find_name_from_path, "//", ""); TEST_PATH(utf8::find_name_from_path, "///", ""); + TEST_PATH(utf8::find_name_from_path, "C/", "C"); + TEST_PATH(utf8::find_name_from_path, "/C/", "C"); + TEST_PATH(utf8::find_name_from_path, "C/D/", "D"); + TEST_PATH(utf8::find_name_from_path, "/C/D/E/", "E"); + TEST_PATH(utf8::find_name_from_path, "foo/bar/D/", "D"); + TEST_PATH(utf8::find_name_from_path, "/foo/bar/E/qux/", "qux"); TEST_PATH(utf8::find_name_from_path, "foo/bar/baz/qux/", "qux"); TEST_PATH(utf8::find_name_from_path, "foo/bar/baz/qux//", "qux"); TEST_PATH(utf8::find_name_from_path, "foo/bar/baz/qux///", "qux"); @@ -434,6 +440,11 @@ TEST_CASE("UTF-8 Find Base Name From Path", "[utf8]") { TEST_PATH(utf8::find_base_name_from_path, "foo/bar/baz/qux/", "qux"); TEST_PATH(utf8::find_base_name_from_path, "foo/bar/baz/qux//", "qux"); TEST_PATH(utf8::find_base_name_from_path, "foo/bar/baz/qux///", "qux"); + TEST_PATH(utf8::find_base_name_from_path, "C/", "C"); + TEST_PATH(utf8::find_base_name_from_path, "/C/", "C"); + TEST_PATH(utf8::find_base_name_from_path, "C/D/", "D"); + TEST_PATH(utf8::find_base_name_from_path, "/C/D/E/", "E"); + TEST_PATH(utf8::find_base_name_from_path, "foo/bar/D/", "D"); TEST_PATH(utf8::find_base_name_from_path, "ほげ/ぴよ/ふが/ほげら/ほげほげ.txt", "ほげほげ"); TEST_PATH(utf8::find_base_name_from_path, "ほげ/ぴよ/ふが/ほげら/ほげほげ/",