summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-12 10:05:35 +0200
committerGitHub <noreply@github.com>2019-08-12 10:05:35 +0200
commit839cc98cb9d65bd80f50a7f981350966fedc54ee (patch)
treeef0ba4d9f88df0cfaecade9d8e87ce24fe50441c
parent6c8434a98d22e9d50008a1d143a935a1e996d7f4 (diff)
parenta1a0fb1467f72c652cacbc77fa7efdb241b8e454 (diff)
Merge pull request #31290 from nekomatata/fix-test-regex-disabled
Fixed link errors when building in debug with RegEx module disabled
-rw-r--r--SConstruct7
-rw-r--r--main/tests/test_string.cpp5
2 files changed, 12 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index aa5e3a98c8..128c5b0e92 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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)
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index ab5fb64252..7a41880645 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -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 {