参考所有分组:补 close_and_downcase word source 覆盖,测试通过
This commit is contained in:
@@ -1495,6 +1495,12 @@ CNC_SIM_RS274_VAR="$var_file" \
|
||||
CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_extended_linenumbers.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_extended_linenumbers.json"
|
||||
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc read_text()
|
||||
# calls close_and_downcase() to downcase words and remove spaces/tabs outside
|
||||
# comments before read_items() dispatches the words.
|
||||
CNC_SIM_RS274_VAR="$var_file" \
|
||||
"$build_dir/linuxcnc_rs274_source_dump" tests/gcode/linuxcnc_close_and_downcase_words.ngc \
|
||||
>"$output_dir/cnc_sim_linuxcnc_source_close_and_downcase_words.json"
|
||||
|
||||
CNC_SIM_RS274_SOURCE_OUTPUT_DIR="$output_dir" python3 - <<'PY'
|
||||
import json
|
||||
@@ -1556,6 +1562,16 @@ if extended_spindle_states[:3] != [(1, 111), (2, 222), (3, 333)]:
|
||||
f"{extended_spindle_states!r}"
|
||||
)
|
||||
|
||||
close_and_downcase_words = load("cnc_sim_linuxcnc_source_close_and_downcase_words.json")
|
||||
if not any(
|
||||
event["type"] == "linear-feed" and
|
||||
event["line"] == 3 and
|
||||
event["end"]["x"] == 3 and
|
||||
event["end"]["y"] == 4
|
||||
for event in close_and_downcase_words
|
||||
):
|
||||
raise SystemExit("missing source-linked close_and_downcase mixed-case spaced-word move")
|
||||
|
||||
block_delete_off = load("cnc_sim_linuxcnc_source_block_delete_off.json")
|
||||
if not any(
|
||||
event["type"] == "linear-feed" and event["line"] == 2 and event["end"]["x"] == 5
|
||||
@@ -3444,3 +3460,4 @@ echo "dumped $output_dir/cnc_sim_linuxcnc_source_g52_xz_nurbs.json"
|
||||
echo "dumped $output_dir/cnc_sim_linuxcnc_source_g62_xz_nurbs.json"
|
||||
echo "dumped $output_dir/cnc_sim_linuxcnc_source_fractional_linenumbers.json"
|
||||
echo "dumped $output_dir/cnc_sim_linuxcnc_source_extended_linenumbers.json"
|
||||
echo "dumped $output_dir/cnc_sim_linuxcnc_source_close_and_downcase_words.json"
|
||||
|
||||
Reference in New Issue
Block a user