参考所有分组:补 percent 错误 source 覆盖,测试通过
This commit is contained in:
@@ -567,6 +567,8 @@ grep -F 'tests/gcode/linuxcnc_close_and_downcase_words.ngc' test-linuxcnc-source
|
||||
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
|
||||
grep -F 'linuxcnc_commented_percent_error|Bad character '\''%'\'' used' test-linuxcnc-source-link.sh >/dev/null
|
||||
grep -F 'linuxcnc_mid_program_percent_error|Bad character '\''%'\'' used' test-linuxcnc-source-link.sh >/dev/null
|
||||
|
||||
for script in \
|
||||
test-native.sh \
|
||||
|
||||
@@ -1022,9 +1022,13 @@ done
|
||||
# read_one_item() then uses the default reader table from interp_array.cc
|
||||
# and rejects unknown item-start characters, including middle-of-line or
|
||||
# comment-prefixed N/O words, midline O-words, bracket expressions, naked numbers, and
|
||||
# non-leading ATAN argument slashes.
|
||||
# non-leading ATAN argument slashes. LinuxCNC src/emc/rs274ngc/rs274ngc_pre.cc
|
||||
# open() only enables percent-file mode when the first nonblank line contains
|
||||
# only '%', so commented or non-opening percent lines reach read_one_item().
|
||||
bad_character_error_cases=(
|
||||
"linuxcnc_bad_character_bang_error|Bad character '!' used"
|
||||
"linuxcnc_commented_percent_error|Bad character '%' used"
|
||||
"linuxcnc_mid_program_percent_error|Bad character '%' used"
|
||||
"linuxcnc_bad_character_middle_n_word_error|Bad character 'n' used"
|
||||
"linuxcnc_comment_prefixed_n_word_error|Bad character 'n' used"
|
||||
"linuxcnc_comment_prefixed_spaced_n_word_error|Bad character 'n' used"
|
||||
|
||||
3
tests/gcode/linuxcnc_commented_percent_error.ngc
Normal file
3
tests/gcode/linuxcnc_commented_percent_error.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
% (not a delimiter)
|
||||
G0 X1
|
||||
%
|
||||
3
tests/gcode/linuxcnc_mid_program_percent_error.ngc
Normal file
3
tests/gcode/linuxcnc_mid_program_percent_error.ngc
Normal file
@@ -0,0 +1,3 @@
|
||||
G0 X1
|
||||
%
|
||||
G0 Y2
|
||||
Reference in New Issue
Block a user