From d1e0152eb87cf760a9e696d2b70d97526b08fd4b Mon Sep 17 00:00:00 2001 From: cnc Date: Wed, 3 Jun 2026 09:36:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=9A=E8=A1=A5=20G10=20tool=20source=20=E8=A6=86?= =?UTF-8?q?=E7=9B=96=EF=BC=8C=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-linuxcnc-rs274-native.sh | 4 ++++ test-linuxcnc-source-link.sh | 4 ++++ tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc | 2 ++ tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc | 2 ++ tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc | 2 ++ tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc | 2 ++ 6 files changed, 16 insertions(+) create mode 100644 tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc create mode 100644 tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc create mode 100644 tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc create mode 100644 tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc diff --git a/test-linuxcnc-rs274-native.sh b/test-linuxcnc-rs274-native.sh index 3efb453..9f03c02 100755 --- a/test-linuxcnc-rs274-native.sh +++ b/test-linuxcnc-rs274-native.sh @@ -241,7 +241,11 @@ done # convert_setup() rejects disallowed G10 L2/L20 words, and # convert_tool_table() rejects G10 L1 table updates without offsets. g10_convert_error_cases=( + "linuxcnc_g10_l1_missing_tool_error|Requested tool 999 not found in the tool table" "linuxcnc_g10_l1_without_offsets_error|G10 L1 without offsets has no effect" + "linuxcnc_g10_l1_q_noninteger_error|Q number in G10 is not an integer" + "linuxcnc_g10_l1_q_negative_error|Q number in G10 is not an integer" + "linuxcnc_g10_l1_q_out_of_range_error|Invalid tool orientation" "linuxcnc_g10_l2_i_word_error|I J words not allowed with G10 L2" "linuxcnc_g10_l20_i_word_error|I J words not allowed with G10 L2" "linuxcnc_g10_l20_r_word_error|R not allowed in G10 L20" diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index 6c84c60..3e1aec5 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -685,7 +685,11 @@ done # convert_setup() rejects disallowed G10 L2/L20 words, and # convert_tool_table() rejects G10 L1 table updates without offsets. g10_convert_error_cases=( + "linuxcnc_g10_l1_missing_tool_error|Requested tool 999 not found in the tool table" "linuxcnc_g10_l1_without_offsets_error|G10 L1 without offsets has no effect" + "linuxcnc_g10_l1_q_noninteger_error|Q number in G10 is not an integer" + "linuxcnc_g10_l1_q_negative_error|Q number in G10 is not an integer" + "linuxcnc_g10_l1_q_out_of_range_error|Invalid tool orientation" "linuxcnc_g10_l2_i_word_error|I J words not allowed with G10 L2" "linuxcnc_g10_l20_i_word_error|I J words not allowed with G10 L2" "linuxcnc_g10_l20_r_word_error|R not allowed in G10 L20" diff --git a/tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc b/tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc new file mode 100644 index 0000000..22aa84a --- /dev/null +++ b/tests/gcode/linuxcnc_g10_l1_missing_tool_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G10 L1 P999 X0 diff --git a/tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc b/tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc new file mode 100644 index 0000000..ad173a8 --- /dev/null +++ b/tests/gcode/linuxcnc_g10_l1_q_negative_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G10 L1 P1 Q-2 diff --git a/tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc b/tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc new file mode 100644 index 0000000..10af0d3 --- /dev/null +++ b/tests/gcode/linuxcnc_g10_l1_q_noninteger_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G10 L1 P1 Q1.5 diff --git a/tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc b/tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc new file mode 100644 index 0000000..d7e1229 --- /dev/null +++ b/tests/gcode/linuxcnc_g10_l1_q_out_of_range_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G10 L1 P1 Q10