参考所有分组:补 comment 错误 source 覆盖,测试通过

This commit is contained in:
cnc
2026-06-03 09:04:26 +08:00
parent 9bf9206869
commit 2dd9847a7b
4 changed files with 10 additions and 1 deletions

View File

@@ -565,6 +565,8 @@ grep -F 'tests/gcode/linuxcnc_fractional_linenumbers.ngc' test-linuxcnc-source-l
grep -F 'tests/gcode/linuxcnc_extended_linenumbers.ngc' test-linuxcnc-source-link.sh >/dev/null grep -F 'tests/gcode/linuxcnc_extended_linenumbers.ngc' test-linuxcnc-source-link.sh >/dev/null
grep -F 'tests/gcode/linuxcnc_close_and_downcase_words.ngc' test-linuxcnc-source-link.sh >/dev/null grep -F 'tests/gcode/linuxcnc_close_and_downcase_words.ngc' test-linuxcnc-source-link.sh >/dev/null
grep -F 'tests/gcode/linuxcnc_percent_file_ignores_trailing.ngc' test-linuxcnc-source-link.sh >/dev/null grep -F 'tests/gcode/linuxcnc_percent_file_ignores_trailing.ngc' test-linuxcnc-source-link.sh >/dev/null
grep -F 'linuxcnc_unclosed_comment_error|Unclosed comment found' test-linuxcnc-source-link.sh >/dev/null
grep -F 'linuxcnc_nested_comment_error|Nested comment found' test-linuxcnc-source-link.sh >/dev/null
for script in \ for script in \
test-native.sh \ test-native.sh \

View File

@@ -1202,11 +1202,14 @@ done
# Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc read_text() # Source basis: LinuxCNC src/emc/rs274ngc/interp_read.cc read_text()
# rejects EOF without the matching percent/program end and overlong file # rejects EOF without the matching percent/program end and overlong file
# lines; read_n_number() rejects malformed N-line numbers through # lines; read_n_number() rejects malformed N-line numbers through
# read_integer_unsigned(). # read_integer_unsigned(); src/emc/rs274ngc/interp_internal.cc
# close_and_downcase() rejects unclosed and nested parenthesis comments.
read_text_error_cases=( read_text_error_cases=(
"linuxcnc_file_ended_no_program_end_error|File ended with no percent sign" "linuxcnc_file_ended_no_program_end_error|File ended with no percent sign"
"linuxcnc_file_ended_no_percent_error|File ended with no percent sign" "linuxcnc_file_ended_no_percent_error|File ended with no percent sign"
"linuxcnc_bad_n_number_format_error|Bad format unsigned integer" "linuxcnc_bad_n_number_format_error|Bad format unsigned integer"
"linuxcnc_unclosed_comment_error|Unclosed comment found"
"linuxcnc_nested_comment_error|Nested comment found"
) )
for case in "${read_text_error_cases[@]}"; do for case in "${read_text_error_cases[@]}"; do
fixture=${case%%|*} fixture=${case%%|*}

View File

@@ -0,0 +1,2 @@
G21 G90
G0 X1 (outer (inner))

View File

@@ -0,0 +1,2 @@
G21 G90
G0 X1 (missing close