Merge pull request #31290 from nekomatata/fix-test-regex-disabled

Fixed link errors when building in debug with RegEx module disabled
This commit is contained in:
Rémi Verschelde 2019-08-12 10:05:35 +02:00 committed by GitHub
commit 839cc98cb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -484,6 +484,13 @@ if selected_platform in platform_list:
if env['minizip']:
env.Append(CPPDEFINES=['MINIZIP_ENABLED'])
editor_module_list = ['regex']
for x in editor_module_list:
if not env['module_' + x + '_enabled']:
if env['tools']:
print("Build option 'module_" + x + "_enabled=no' cannot be used with 'tools=yes' (editor), only with 'tools=no' (export template).")
sys.exit(255)
if not env['verbose']:
methods.no_verbose(sys, env)

View file

@ -432,6 +432,10 @@ bool test_26() {
OS::get_singleton()->print("\n\nTest 26: RegEx substitution\n");
#ifndef MODULE_REGEX_ENABLED
OS::get_singleton()->print("\tRegEx module disabled, can't run test.");
return false;
#else
String s = "Double all the vowels.";
OS::get_singleton()->print("\tString: %ls\n", s.c_str());
@ -443,6 +447,7 @@ bool test_26() {
OS::get_singleton()->print("\tResult: %ls\n", s.c_str());
return (s == "Doouublee aall thee vooweels.");
#endif
}
struct test_27_data {