diff options
author | jsjtxietian <jsjtxietian@outlook.com> | 2024-08-06 12:43:35 +0800 |
---|---|---|
committer | jsjtxietian <jsjtxietian@outlook.com> | 2024-08-08 11:59:14 +0800 |
commit | 6cf9af2817a9751bf3d677165bf8ceb85f4186f0 (patch) | |
tree | 61dfd588d1eede2ec5f09b91c556926c8e5ff9e5 /tests | |
parent | 3978628c6cc1227250fc6ed45c8d854d24c30c30 (diff) | |
download | redot-engine-6cf9af2817a9751bf3d677165bf8ceb85f4186f0.tar.gz |
Fix error when use relative #include in .gdshader / .gdshaderinc file
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/config/test_project_settings.h | 7 | ||||
-rw-r--r-- | tests/core/string/test_string.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/core/config/test_project_settings.h b/tests/core/config/test_project_settings.h index 8fc2489f8b..0e1058a626 100644 --- a/tests/core/config/test_project_settings.h +++ b/tests/core/config/test_project_settings.h @@ -126,10 +126,9 @@ TEST_CASE("[ProjectSettings] localize_path") { CHECK_EQ(ProjectSettings::get_singleton()->localize_path("path\\.\\filename"), "res://path/filename"); #endif - // FIXME?: These checks pass, but that doesn't seems correct - CHECK_EQ(ProjectSettings::get_singleton()->localize_path("../filename"), "res://filename"); - CHECK_EQ(ProjectSettings::get_singleton()->localize_path("../path/filename"), "res://path/filename"); - CHECK_EQ(ProjectSettings::get_singleton()->localize_path("..\\path\\filename"), "res://path/filename"); + CHECK_EQ(ProjectSettings::get_singleton()->localize_path("../filename"), "../filename"); + CHECK_EQ(ProjectSettings::get_singleton()->localize_path("../path/filename"), "../path/filename"); + CHECK_EQ(ProjectSettings::get_singleton()->localize_path("..\\path\\filename"), "../path/filename"); CHECK_EQ(ProjectSettings::get_singleton()->localize_path("/testroot/filename"), "/testroot/filename"); CHECK_EQ(ProjectSettings::get_singleton()->localize_path("/testroot/path/filename"), "/testroot/path/filename"); diff --git a/tests/core/string/test_string.h b/tests/core/string/test_string.h index cf57183a02..1b27966da1 100644 --- a/tests/core/string/test_string.h +++ b/tests/core/string/test_string.h @@ -1594,7 +1594,7 @@ TEST_CASE("[String] Path functions") { static const char *base_name[8] = { "C:\\Godot\\project\\test", "/Godot/project/test", "../Godot/project/test", "Godot\\test", "C:\\test", "res://test", "user://test", "/" }; static const char *ext[8] = { "tscn", "xscn", "scn", "doc", "", "", "", "test" }; static const char *file[8] = { "test.tscn", "test.xscn", "test.scn", "test.doc", "test.", "test", "test", ".test" }; - static const char *simplified[8] = { "C:/Godot/project/test.tscn", "/Godot/project/test.xscn", "Godot/project/test.scn", "Godot/test.doc", "C:/test.", "res://test", "user://test", "/.test" }; + static const char *simplified[8] = { "C:/Godot/project/test.tscn", "/Godot/project/test.xscn", "../Godot/project/test.scn", "Godot/test.doc", "C:/test.", "res://test", "user://test", "/.test" }; static const bool abs[8] = { true, true, false, false, true, true, true, true }; for (int i = 0; i < 8; i++) { |