Skip to content

Commit 8d01157

Browse files
committed
Solved issues in cli tests.
1 parent e9078eb commit 8d01157

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

source/cli/metacallcli/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_NODE AND OPTION_BUILD_SCRIPTS A
227227
PROPERTY LABELS ${target}-node
228228
)
229229
set_tests_properties(${target}-node PROPERTIES
230-
PASS_REGULAR_EXPRESSION "700.0"
230+
PASS_REGULAR_EXPRESSION "7001234"
231231
)
232232
test_environment_variables(${target}-node
233233
""
@@ -367,7 +367,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_FILE AND OPTION_BUILD_SCRIPTS A
367367
PROPERTY LABELS ${target}-file-fail
368368
)
369369
set_tests_properties(${target}-file-fail PROPERTIES
370-
PASS_REGULAR_EXPRESSION "Script \\(this-does-not-exist\\) load error in loader \\(file\\)"
370+
PASS_REGULAR_EXPRESSION "Error: Failed to load script 'this-does-not-exist' with loader 'file'"
371371
)
372372
test_environment_variables(${target}-file-fail
373373
""
@@ -443,7 +443,7 @@ if(OPTION_BUILD_LOADERS AND OPTION_BUILD_LOADERS_TS AND OPTION_BUILD_SCRIPTS AND
443443
PROPERTY LABELS ${target}-ts
444444
)
445445
set_tests_properties(${target}-ts PROPERTIES
446-
PASS_REGULAR_EXPRESSION "9.0"
446+
PASS_REGULAR_EXPRESSION "51354"
447447
)
448448
test_environment_variables(${target}-ts
449449
""

source/cli/metacallcli/source/application.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ void application::arguments_parse_fallback(std::vector<std::string> &arguments)
225225
if (metacall_load_from_file(safe_tag.c_str(), scripts, 1, NULL) != 0)
226226
{
227227
/* Stop loading more scripts */
228+
std::cout << "Error: Failed to load script '" << script << "' with loader '" << safe_tag << "'" << std::endl;
228229
return;
229230
}
230231
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
load node nod.js
22
inspect
3-
call hello_boy(300, 400)
3+
call hello_boy(300, 4001234)
44
exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
load ts typedfunc.ts
22
inspect
3-
call typed_sum(4, 5)
3+
call typed_sum(4, 51350)
44
exit

source/cli/plugins/cli_repl_plugin/source/cli_core_command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const loaders = '^(mock|py|node|rb|cs|cob|ts|js|file|wasm|rs|c|rpc|ext|java)';
22
const all_except_whitespaces = '^[^ \r\n\t\f\v]+';
3-
const func = '^[a-zA-Z0-9_]+\\(.*\\)$';
3+
const func = '^[a-zA-Z0-9_\.]+\\(.*\\)$';
44
const anychar = '.+';
55

66
/*

0 commit comments

Comments
 (0)