继续按 align-linuxcnc 约束:补 O-word 调用错误源码覆盖,测试通过
This commit is contained in:
@@ -874,8 +874,9 @@ if CNC_SIM_RS274_FILE_MODE=1 CNC_SIM_RS274_VAR="$var_file" \
|
||||
exit 1
|
||||
fi
|
||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc read_o()
|
||||
# and read_items() reject malformed O-word control lines and Fanuc-style
|
||||
# M98 calls before execution.
|
||||
# and read_items() reject malformed O-word control lines, empty call
|
||||
# parameter expressions through read_real_expression()/read_real_number(),
|
||||
# and Fanuc-style M98 calls before execution.
|
||||
oword_reader_error_cases=(
|
||||
"linuxcnc_oword_unknown_command_error|Unknown control command in o word"
|
||||
"linuxcnc_oword_unexpected_trailing_item_error|Unexpected character after O-word"
|
||||
@@ -884,6 +885,7 @@ oword_reader_error_cases=(
|
||||
"linuxcnc_oword_while_missing_bracket_error|Left bracket missing after 'while'"
|
||||
"linuxcnc_oword_repeat_missing_bracket_error|Left bracket missing after 'repeat'"
|
||||
"linuxcnc_oword_too_many_call_parameters_error|Too many subroutine parameters"
|
||||
"linuxcnc_oword_empty_call_parameter_error|bad number format (conversion failed) parsing ''"
|
||||
"linuxcnc_m98_missing_p_word_error|Found 'm98' code with no P-word"
|
||||
"linuxcnc_comment_prefixed_m98_error|Unknown m code used: M98"
|
||||
)
|
||||
@@ -919,6 +921,7 @@ oword_execution_error_cases=(
|
||||
"linuxcnc_oword_endwhile_no_matching_while_error|no matching label"
|
||||
"linuxcnc_oword_fanuc_requires_m99_error|Fanuc 'O....' subroutine definition must end with 'M99'"
|
||||
"linuxcnc_oword_sub_requires_endsub_error|'O.... endsub' or 'O.... return' must follow 'O.... sub'"
|
||||
"linuxcnc_oword_too_many_call_levels_error|Too many subroutine levels"
|
||||
)
|
||||
for case in "${oword_execution_error_cases[@]}"; do
|
||||
fixture=${case%%|*}
|
||||
|
||||
Reference in New Issue
Block a user