继续按 align-linuxcnc 约束:补 O-word 匹配错误源码覆盖

结论:新增 undefined/no-matching O-word label 与子程序闭合方式错误的 source-link 断言;依据 LinuxCNC interp_o_word.cc,未扩展 smoke。
This commit is contained in:
cnc
2026-06-02 18:01:07 +08:00
parent cc708b1ccc
commit 4f1042c548
13 changed files with 33 additions and 1 deletions

View File

@@ -901,8 +901,19 @@ oword_execution_error_cases=(
"linuxcnc_oword_return_without_sub_error|not in a subroutine definition"
"linuxcnc_oword_duplicate_if_label_error|duplicate O-word label"
"linuxcnc_oword_elseif_undefined_label_error|undefined O-word label"
"linuxcnc_oword_else_undefined_label_error|undefined O-word label"
"linuxcnc_oword_endif_undefined_label_error|undefined O-word label"
"linuxcnc_oword_break_undefined_label_error|undefined O-word label"
"linuxcnc_oword_continue_undefined_label_error|undefined O-word label"
"linuxcnc_oword_endwhile_undefined_label_error|undefined O-word label"
"linuxcnc_oword_elseif_no_matching_if_error|no matching 'if' label"
"linuxcnc_oword_break_no_matching_loop_error|no matching while/do label"
"linuxcnc_oword_continue_no_matching_loop_error|no matching while/do label"
"linuxcnc_oword_endrepeat_no_matching_repeat_error|no matching label"
"linuxcnc_oword_endif_no_matching_if_error|no matching label"
"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'"
)
for case in "${oword_execution_error_cases[@]}"; do
fixture=${case%%|*}