按规划持续工作
This commit is contained in:
8
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/README
vendored
Normal file
8
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/README
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
exercise the (ABORT,<message>) hot comment:
|
||||
|
||||
numbered, named and INI parameter substitution in message
|
||||
case preservation
|
||||
unwind from oword flow
|
||||
|
||||
|
||||
|
||||
10
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/expected
vendored
Normal file
10
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/expected
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
executing
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
MixedCase param42=20.000000 named=4711.000000 INI=3.140000
|
||||
(abort, MixedCase param42=#42 named=#<named> INI=#<_ini[a]value>)
|
||||
7 N..... ON_RESET()
|
||||
8
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.ini
vendored
Normal file
8
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.ini
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
[RS274NGC]
|
||||
# enable #<_ini[section]name> expansion
|
||||
INI_VARS = 1
|
||||
|
||||
# test ini variable expansion in (ABORT, text) comment
|
||||
[A]
|
||||
VALUE= 3.14
|
||||
|
||||
10
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.ngc
vendored
Normal file
10
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.ngc
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
#42 = 0
|
||||
#<named> = 4711
|
||||
o100 while [#42 lt 100]
|
||||
o200 if [#42 eq 20]
|
||||
(abort, MixedCase param42=#42 named=#<named> INI=#<_ini[a]value>)
|
||||
o200 endif
|
||||
#42 = [#42 + 1]
|
||||
o100 endwhile
|
||||
|
||||
M2
|
||||
5
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.sh
vendored
Executable file
5
wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment/test.sh
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
export PYTHONUNBUFFERED=1
|
||||
rs274 -n 2 -i test.ini -g test.ngc 2>&1
|
||||
exit 0
|
||||
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/README
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/README
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
Tests for bug 3420655 (http://sourceforge.net/tracker/?func=detail&atid=106744&aid=3420655&group_id=6744)
|
||||
|
||||
|
||||
7
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/bug.ngc
vendored
Normal file
7
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/bug.ngc
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
o102 do
|
||||
(print,@start of do-while-loop)
|
||||
o102 break
|
||||
(print,@end of do-while-loop)
|
||||
o102 while [1]
|
||||
(print,@endsub)
|
||||
M2
|
||||
21
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/expected
vendored
Normal file
21
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/expected
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... MESSAGE("must-execute-outer")
|
||||
N..... MESSAGE("must-execute-nested")
|
||||
N..... MESSAGE("must-execute-inner")
|
||||
N..... MESSAGE("post-inner-while")
|
||||
N..... MESSAGE("post-nested-while")
|
||||
N..... MESSAGE("post-outer-while")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
30
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/test.ngc
vendored
Normal file
30
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/test.ngc
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
#<one_pass> = 0
|
||||
|
||||
o100 do
|
||||
(debug,must-execute-outer)
|
||||
#<one_pass> = [#<one_pass> + 1]
|
||||
#<two_pass> = 0
|
||||
o200 do
|
||||
(debug,must-execute-nested)
|
||||
#<two_pass> = [#<two_pass> + 1]
|
||||
#<three_pass> = 0
|
||||
o300 do
|
||||
(debug,must-execute-inner)
|
||||
#<three_pass> = [#<three_pass> + 1]
|
||||
o300 break
|
||||
(debug,do-not-execute-inner)
|
||||
o300 while [#<three_pass> LT 3]
|
||||
(debug,post-inner-while)
|
||||
|
||||
o200 break
|
||||
(debug,do-not-execute-nested)
|
||||
o200 while [#<two_pass> LT 3]
|
||||
(debug,post-nested-while)
|
||||
|
||||
o100 break
|
||||
(debug,do-not-execute-outer)
|
||||
o100 while [#<one_pass> LT 3]
|
||||
(debug,post-outer-while)
|
||||
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/do-while-break/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/exists/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/exists/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Test that EXISTS[] works as desired
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/exists/expected
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/exists/expected
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("comment")
|
||||
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
7
wasm-port/vendor/linuxcnc/tests/interp/exists/test.ngc
vendored
Normal file
7
wasm-port/vendor/linuxcnc/tests/interp/exists/test.ngc
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
#<a>=999
|
||||
G0 X EXISTS[#1] Y EXISTS[#99999] Z EXISTS[#<a>] A EXISTS[#<b>] ; comment
|
||||
|
||||
#1=2
|
||||
#2=99999
|
||||
G0 X EXISTS[##1] Y EXISTS[##2] Z EXISTS[###1] (comment)
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/exists/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/exists/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Test that line numbers like Ndddd.ddd are accepted too
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/expected
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/expected
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... SET_SPINDLE_SPEED(0, 300.0000)
|
||||
N1234 SET_SPINDLE_SPEED(0, 600.0000)
|
||||
N4567 SET_SPINDLE_SPEED(0, 1200.0000)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
4
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.ngc
vendored
Normal file
4
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.ngc
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
S300
|
||||
N1234 S600
|
||||
N4567.789 S1200
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
23
wasm-port/vendor/linuxcnc/tests/interp/g6164/expected
vendored
Normal file
23
wasm-port/vendor/linuxcnc/tests/interp/g6164/expected
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 1.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(1.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 1.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(2.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_STOP)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
6
wasm-port/vendor/linuxcnc/tests/interp/g6164/test.ngc
vendored
Normal file
6
wasm-port/vendor/linuxcnc/tests/interp/g6164/test.ngc
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
G64
|
||||
G64P1
|
||||
G64P1Q2
|
||||
G61
|
||||
G61.1
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/g6164/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/g6164/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/README
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/README
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
assigning to an inifile variable reference must fail:
|
||||
|
||||
#<_ini[section]name> = <value>
|
||||
10
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/expected
vendored
Normal file
10
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/expected
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
executing
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
Cannot assign to read-only parameter #<_ini[vars]toolchange_x>
|
||||
#<_ini[vars]toolchange_x> = 3.1415
|
||||
7 N..... ON_RESET()
|
||||
9
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.ini
vendored
Normal file
9
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.ini
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[EMC]
|
||||
DEBUG=0
|
||||
LOG_LEVEL=0
|
||||
|
||||
[RS274NGC]
|
||||
INI_VARS = 1
|
||||
|
||||
[VARS]
|
||||
TOOLCHANGE_X = 10
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.ngc
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.ngc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#<_ini[vars]toolchange_x> = 3.1415
|
||||
(debug, notreached: #<_ini[vars]toolchange_x>)
|
||||
M2
|
||||
8
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.sh
vendored
Executable file
8
wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign/test.sh
vendored
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
export PYTHONUNBUFFERED=1
|
||||
if ! rs274 -i test.ini -g test.ngc 2>&1; then
|
||||
# expected to fail
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
5
wasm-port/vendor/linuxcnc/tests/interp/iniparam/README
vendored
Normal file
5
wasm-port/vendor/linuxcnc/tests/interp/iniparam/README
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
named parameters can now reference INI variables; they are retrieved on demand and
|
||||
cached as global read-only parameters.
|
||||
|
||||
Syntax: #<_ini[section]name>
|
||||
13
wasm-port/vendor/linuxcnc/tests/interp/iniparam/expected
vendored
Normal file
13
wasm-port/vendor/linuxcnc/tests/interp/iniparam/expected
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
executing
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... STRAIGHT_TRAVERSE(10.0000, 20.0000, 30.0000, 0.0000, 0.0000, 0.0000)
|
||||
8 N..... MESSAGE(" position now: 10.000000 20.000000 30.000000")
|
||||
9 N..... MESSAGE(" not in INI: ######")
|
||||
Named parameter #<_ini[nosuchsection]nosuchname> not defined
|
||||
#4711 = #<_iNI[nosuchsection]nosuchname>
|
||||
10 N..... ON_RESET()
|
||||
12
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.ini
vendored
Normal file
12
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.ini
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
[EMC]
|
||||
DEBUG=0
|
||||
LOG_LEVEL=0
|
||||
|
||||
[RS274NGC]
|
||||
INI_VARS = 1
|
||||
|
||||
|
||||
[VARS]
|
||||
TOOLCHANGE_X = 10
|
||||
TOOLCHANGE_Y = 20
|
||||
TOOLCHANGE_Z = 30
|
||||
9
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.ngc
vendored
Normal file
9
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.ngc
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
G53 G0 x#<_ini[vars]toolchange_x> y#<_InI[vars]toolchange_y> z#<_INi[vars]toolchange_z>
|
||||
(debug, position now: #<_x> #<_y> #<_z>)
|
||||
|
||||
(debug, not in INI: #<_iNi[nosuchsection]nosuchname>)
|
||||
|
||||
; now fail referencing an undefined INI variable:
|
||||
#4711 = #<_iNI[nosuchsection]nosuchname>
|
||||
|
||||
M2
|
||||
5
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.sh
vendored
Executable file
5
wasm-port/vendor/linuxcnc/tests/interp/iniparam/test.sh
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
export PYTHONUNBUFFERED=1
|
||||
rs274 -i test.ini -g test.ngc 2>&1
|
||||
# this is expected to fail on the undefined INI var
|
||||
exit 0
|
||||
2
wasm-port/vendor/linuxcnc/tests/interp/m19/README
vendored
Normal file
2
wasm-port/vendor/linuxcnc/tests/interp/m19/README
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
exercise M19 and possible parameters
|
||||
|
||||
20
wasm-port/vendor/linuxcnc/tests/interp/m19/expected
vendored
Normal file
20
wasm-port/vendor/linuxcnc/tests/interp/m19/expected
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... ORIENT_SPINDLE(0, 87.0000, 0)
|
||||
N..... SPINDLE.0.WAIT_ORIENT_COMPLETE(2.0000)
|
||||
N..... ORIENT_SPINDLE(0, 42.0000, 1)
|
||||
N..... ORIENT_SPINDLE(0, 132.0000, 0)
|
||||
N..... ORIENT_SPINDLE(0, 132.0000, 1)
|
||||
N..... SPINDLE.0.WAIT_ORIENT_COMPLETE(1.0000)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
2
wasm-port/vendor/linuxcnc/tests/interp/m19/test.ini
vendored
Normal file
2
wasm-port/vendor/linuxcnc/tests/interp/m19/test.ini
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
[RS274NGC]
|
||||
ORIENT_OFFSET = 42.0
|
||||
8
wasm-port/vendor/linuxcnc/tests/interp/m19/test.ngc
vendored
Normal file
8
wasm-port/vendor/linuxcnc/tests/interp/m19/test.ngc
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
M19
|
||||
M19 R45 Q2
|
||||
M19 P1
|
||||
M19 R90 P0
|
||||
M19 R90 P1
|
||||
M19 Q1
|
||||
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m19/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m19/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -n 0 -i test.ini -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
49
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/expected
vendored
Normal file
49
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/expected
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... COMMENT("A simple O sub example ")
|
||||
N..... SET_FEED_RATE(40.0000)
|
||||
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... COMMENT("interpreter: retract mode set to r_plane")
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH)
|
||||
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... COMMENT("interpreter: retract mode set to r_plane")
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH)
|
||||
N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_FEED(2.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to incremental")
|
||||
N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... COMMENT("interpreter: distance mode changed to absolute")
|
||||
N..... COMMENT("interpreter: retract mode set to r_plane")
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH)
|
||||
N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_FEED(3.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000)
|
||||
N..... SET_NAIVECAM_TOLERANCE(0.0000)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PALLET_SHUTTLE()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
13
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/test.ngc
vendored
Normal file
13
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/test.ngc
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
%
|
||||
( A simple O sub example )
|
||||
|
||||
F40
|
||||
G90 G0 X0 Y0 Z0.25
|
||||
M98 P1 L3
|
||||
M30
|
||||
|
||||
O1
|
||||
G91 G0 X1 ; Jog 1" along X (relative)
|
||||
G90 G99 G81 Z-1.0 R0.25 ; Drill to Z-1.0
|
||||
M99
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/test.sh
vendored
Executable file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/01-basics/test.sh
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
25
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/expected
vendored
Normal file
25
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/expected
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... COMMENT("Fanuc params have global scope; rs274ngc params #1..#30 have local scope ")
|
||||
MAIN/FANUC: PRE-M98: 1=42.010000; 30=42.300000; 31=42.310000
|
||||
O1: START: 1=42.010000; 30=42.300000; 31=42.310000
|
||||
O1: END: 1=13.010000; 30=13.300000; 31=13.310000
|
||||
MAIN/FANUC: POST-M98: 1=13.010000; 30=13.300000; 31=13.310000
|
||||
MAIN/RS274NGC: PRE-O-CALL: 1=42.010000; 30=42.300000; 31=42.310000
|
||||
O2: START: 1=0.000000; 30=0.000000; 31=42.310000
|
||||
O2: END: 1=13.010000; 30=13.300000; 31=13.310000
|
||||
MAIN/RS274NGC: POST-O-CALL: 1=42.010000; 30=42.300000; 31=13.310000
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PALLET_SHUTTLE()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
37
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/test.ngc
vendored
Normal file
37
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/test.ngc
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
%
|
||||
( Fanuc params have global scope; rs274ngc params #1..#30 have local scope )
|
||||
|
||||
; Fanuc-style: Test that all params are globally changed
|
||||
#1 = 42.01
|
||||
#30 = 42.30
|
||||
#31 = 42.31
|
||||
(PRINT,Q MAIN/FANUC: PRE-M98: 1=#1; 30=#30; 31=#31)
|
||||
M98 P1
|
||||
(PRINT,Q MAIN/FANUC: POST-M98: 1=#1; 30=#30; 31=#31)
|
||||
|
||||
; RS274NGC-style: Test that params #1..#30 are not globally changed
|
||||
#1 = 42.01
|
||||
#30 = 42.30
|
||||
#31 = 42.31
|
||||
(PRINT,Q MAIN/RS274NGC: PRE-O-CALL: 1=#1; 30=#30; 31=#31)
|
||||
O2 call
|
||||
(PRINT,Q MAIN/RS274NGC: POST-O-CALL: 1=#1; 30=#30; 31=#31)
|
||||
M30
|
||||
|
||||
O1 ; Fanuc-style
|
||||
(PRINT,Q O1: START: 1=#1; 30=#30; 31=#31)
|
||||
#1 = 13.01
|
||||
#30 = 13.30
|
||||
#31 = 13.31
|
||||
(PRINT,Q O1: END: 1=#1; 30=#30; 31=#31)
|
||||
M99
|
||||
|
||||
O2 sub ; rs274ngc-style
|
||||
(PRINT,Q O2: START: 1=#1; 30=#30; 31=#31)
|
||||
#1 = 13.01
|
||||
#30 = 13.30
|
||||
#31 = 13.31
|
||||
(PRINT,Q O2: END: 1=#1; 30=#30; 31=#31)
|
||||
O2 endsub
|
||||
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/02-variables/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
49
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/expected
vendored
Normal file
49
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/expected
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... COMMENT("A nested Fanuc subroutine example ")
|
||||
MAIN BEGIN: 1=0.000000
|
||||
>>>> LOOP [O2.O1]: 0.100000
|
||||
>>>> LOOP [O2.O1]: 0.200000
|
||||
>>>> LOOP [O2.O1]: 0.300000
|
||||
>>>> LOOP [O2.O1]: 0.400000
|
||||
>>>> LOOP [O2.O1]: 0.500000
|
||||
O2 END: 1=1.000000
|
||||
>>>> LOOP [O2.O1]: 1.100000
|
||||
>>>> LOOP [O2.O1]: 1.200000
|
||||
>>>> LOOP [O2.O1]: 1.300000
|
||||
>>>> LOOP [O2.O1]: 1.400000
|
||||
>>>> LOOP [O2.O1]: 1.500000
|
||||
O2 END: 1=2.000000
|
||||
>>>> LOOP [O2.O1]: 2.100000
|
||||
>>>> LOOP [O2.O1]: 2.200000
|
||||
>>>> LOOP [O2.O1]: 2.300000
|
||||
>>>> LOOP [O2.O1]: 2.400000
|
||||
>>>> LOOP [O2.O1]: 2.500000
|
||||
O2 END: 1=3.000000
|
||||
>>>> LOOP [O2.O1]: 3.100000
|
||||
>>>> LOOP [O2.O1]: 3.200000
|
||||
>>>> LOOP [O2.O1]: 3.300000
|
||||
>>>> LOOP [O2.O1]: 3.400000
|
||||
>>>> LOOP [O2.O1]: 3.500000
|
||||
O2 END: 1=4.000000
|
||||
>>>> LOOP [O2.O1]: 4.100000
|
||||
>>>> LOOP [O2.O1]: 4.200000
|
||||
>>>> LOOP [O2.O1]: 4.300000
|
||||
>>>> LOOP [O2.O1]: 4.400000
|
||||
>>>> LOOP [O2.O1]: 4.500000
|
||||
O2 END: 1=5.000000
|
||||
MAIN END: 1=5.000000
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PALLET_SHUTTLE()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
20
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/test.ngc
vendored
Normal file
20
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/test.ngc
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
%
|
||||
( A nested Fanuc subroutine example )
|
||||
|
||||
#1 = 0
|
||||
(PRINT,X MAIN BEGIN: 1=#1)
|
||||
M98 P2 L5
|
||||
(PRINT,X MAIN END: 1=#1)
|
||||
M30
|
||||
|
||||
O2
|
||||
M98 P1 L5
|
||||
#1 = [FIX[#1] + 1]
|
||||
(PRINT,X O2 END: 1=#1)
|
||||
M99
|
||||
|
||||
O1
|
||||
#1 = [#1 + 0.1]
|
||||
(PRINT,X >>>> LOOP [O2.O1]: #1)
|
||||
M99
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/expected
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/expected
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... COMMENT("Fanuc-style subs may follow main program ")
|
||||
IN O1
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PALLET_SHUTTLE()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
10
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.ngc
vendored
Normal file
10
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.ngc
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
%
|
||||
( Fanuc-style subs may follow main program )
|
||||
|
||||
M98 P1
|
||||
M30
|
||||
|
||||
O1
|
||||
(PRINT,X IN O1)
|
||||
M99
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
19
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/expected
vendored
Normal file
19
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/expected
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... COMMENT("main program")
|
||||
got here
|
||||
N..... COMMENT("end")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PALLET_SHUTTLE()
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
14
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/test.ngc
vendored
Normal file
14
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/test.ngc
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
%
|
||||
(main program)
|
||||
M98 P0002
|
||||
M30 (end)
|
||||
|
||||
O0002 (O-word begins with '0')
|
||||
(PRINT,x got here)
|
||||
M99
|
||||
|
||||
O2 (O-word does not begin with '0')
|
||||
(PRINT,x ERROR: should not get here)
|
||||
M99
|
||||
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
36
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/expected
vendored
Normal file
36
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/expected
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("test-named.ngc: Test named programs")
|
||||
8 N..... COMMENT("...program body")
|
||||
9 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
10 N..... SET_XY_ROTATION(0.0000)
|
||||
11 N..... SET_FEED_MODE(0, 0)
|
||||
12 N..... SET_FEED_RATE(0.0000)
|
||||
13 N..... STOP_SPINDLE_TURNING(0)
|
||||
14 N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
15 N..... PALLET_SHUTTLE()
|
||||
16 N..... PROGRAM_END()
|
||||
17 N..... ON_RESET()
|
||||
18 N..... ON_RESET()
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("test-numbered.ngc: Test numbered programs")
|
||||
8 N..... COMMENT("...program body")
|
||||
9 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
10 N..... SET_XY_ROTATION(0.0000)
|
||||
11 N..... SET_FEED_MODE(0, 0)
|
||||
12 N..... SET_FEED_RATE(0.0000)
|
||||
13 N..... STOP_SPINDLE_TURNING(0)
|
||||
14 N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
15 N..... PALLET_SHUTTLE()
|
||||
16 N..... PROGRAM_END()
|
||||
17 N..... ON_RESET()
|
||||
18 N..... ON_RESET()
|
||||
6
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-named.ngc
vendored
Normal file
6
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-named.ngc
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
%
|
||||
(test-named.ngc: Test named programs)
|
||||
O<MyProgram>
|
||||
(...program body)
|
||||
M30
|
||||
%
|
||||
6
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-numbered.ngc
vendored
Normal file
6
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-numbered.ngc
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
%
|
||||
(test-numbered.ngc: Test numbered programs)
|
||||
O42
|
||||
(...program body)
|
||||
M30
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
rs274 -g test-named.ngc
|
||||
rs274 -g test-numbered.ngc
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/expected
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/expected
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
In sub 100
|
||||
In sub 200
|
||||
7 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
8 N..... SET_XY_ROTATION(0.0000)
|
||||
9 N..... SET_FEED_MODE(0, 0)
|
||||
10 N..... SET_FEED_RATE(0.0000)
|
||||
11 N..... STOP_SPINDLE_TURNING(0)
|
||||
12 N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
13 N..... PALLET_SHUTTLE()
|
||||
14 N..... PROGRAM_END()
|
||||
15 N..... ON_RESET()
|
||||
16 N..... ON_RESET()
|
||||
21
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/test.ngc
vendored
Normal file
21
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/test.ngc
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
%
|
||||
; test calling subprograms with expressions
|
||||
|
||||
; call sub O100: use variable in expression with rs274ngc O-sub
|
||||
#2 = 10
|
||||
O[#2 * 10] call
|
||||
|
||||
; call sub O200: use expression in M98 P-word
|
||||
M98 P[5 * 5 * 2 * 2 + 100]
|
||||
|
||||
M30
|
||||
|
||||
O100 sub ; rs274ngc subroutine
|
||||
(print,In sub 100)
|
||||
O100 endsub
|
||||
|
||||
O200 ; numbered subprogram
|
||||
(print,In sub 200)
|
||||
M99
|
||||
|
||||
%
|
||||
2
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/test.sh
vendored
Normal file
2
wasm-port/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/test.sh
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash -e
|
||||
rs274 -g test.ngc
|
||||
23
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/expected
vendored
Normal file
23
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/expected
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... MESSAGE(" native value = 1.123457")
|
||||
N..... MESSAGE(" Test round to integer: 1")
|
||||
N..... MESSAGE(" Test round to 4 decimals: 1.1235")
|
||||
N..... MESSAGE(" Test format separate from param: The value is: 1.1235")
|
||||
N..... MESSAGE(" Test round to 7 decimals: 1.1234568")
|
||||
N..... MESSAGE(" native value2 = 2.345679")
|
||||
N..... MESSAGE(" Test2 round all params in line to 4 decimals: The values are: 1.1235, 2.3457")
|
||||
N..... MESSAGE(" Test2 only round last value to integer: The values are: 1.123457, 2")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
13
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/test.ngc
vendored
Normal file
13
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/test.ngc
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
#<value> = 1.123456789
|
||||
|
||||
(DEBUG, native value = #<value>)
|
||||
(DEBUG, Test round to integer: %d#<value>)
|
||||
(DEBUG, Test round to 4 decimals: %f#<value>)
|
||||
(DEBUG, Test format separate from param: %f The value is: #<value>)
|
||||
(DEBUG, Test round to 7 decimals: %.7f#<value>)
|
||||
|
||||
#<value2> = 2.3456789
|
||||
(DEBUG, native value2 = #<value2>)
|
||||
(DEBUG, Test2 round all params in line to 4 decimals: %f The values are: #<value>, #<value2>)
|
||||
(DEBUG, Test2 only round last value to integer: The values are: #<value>, %d#<value2>)
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
test for http://sourceforge.net/p/emc/bugs/424/
|
||||
17
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/expected
vendored
Normal file
17
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/expected
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES)
|
||||
N..... STRAIGHT_TRAVERSE(2.0000, 3.0000, 4.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
6
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/test.ngc
vendored
Normal file
6
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/test.ngc
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
g20
|
||||
#<a>=2
|
||||
#atan[1]/[1]=3
|
||||
#3=4
|
||||
g0 x#<a> y#45 z#3
|
||||
m2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
8
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/expected
vendored
Normal file
8
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/expected
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("Test: nested sub definition inside named sub should error")
|
||||
8 N..... ON_RESET()
|
||||
7
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/subs/nested.ngc
vendored
Normal file
7
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/subs/nested.ngc
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
o<nested> sub
|
||||
o100 sub
|
||||
(DEBUG, inner o100: #1 #2 #3)
|
||||
o100 endsub
|
||||
o100 call [4] [5] [6]
|
||||
o<nested> endsub
|
||||
M2
|
||||
2
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.ini
vendored
Normal file
2
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.ini
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH=subs
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.ngc
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.ngc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
(Test: nested sub definition inside named sub should error)
|
||||
o<nested> call [7] [8] [9]
|
||||
M2
|
||||
4
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.sh
vendored
Normal file
4
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error/test.sh
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash -e
|
||||
# Nested sub definition inside a called named sub must produce an error.
|
||||
# Regression test for LinuxCNC/linuxcnc#3880.
|
||||
! rs274 -g -i test.ini test.ngc
|
||||
9
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/expected
vendored
Normal file
9
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/expected
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("Test: numbered sub after named endsub in same file should error")
|
||||
8 N..... MESSAGE(" sequential main: 7.000000 8.000000 9.000000")
|
||||
9 N..... ON_RESET()
|
||||
9
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/subs/sequential.ngc
vendored
Normal file
9
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/subs/sequential.ngc
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
o<sequential> sub
|
||||
(DEBUG, sequential main: #1 #2 #3)
|
||||
o200 call [4] [5] [6]
|
||||
o<sequential> endsub
|
||||
|
||||
o200 sub
|
||||
(DEBUG, o200 helper: #1 #2 #3)
|
||||
o200 endsub
|
||||
M2
|
||||
2
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.ini
vendored
Normal file
2
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.ini
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH=subs
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.ngc
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.ngc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
(Test: numbered sub after named endsub in same file should error)
|
||||
o<sequential> call [7] [8] [9]
|
||||
M2
|
||||
5
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.sh
vendored
Normal file
5
wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error/test.sh
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash -e
|
||||
# Numbered sub called from within a named sub file, where no matching
|
||||
# file exists, must produce an error (forward-seek blocked).
|
||||
# Regression test for LinuxCNC/linuxcnc#3880.
|
||||
! rs274 -g -i test.ini test.ngc
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
test for http://sourceforge.net/p/emc/bugs/315/, first case
|
||||
17
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/expected
vendored
Normal file
17
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/expected
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... STRAIGHT_TRAVERSE(2.0000, 2.0000, 2.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... MESSAGE("executing this one")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/test.ngc
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/test.ngc
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
o1 sub
|
||||
g0 x1y1z1
|
||||
(debug,not executing this one)
|
||||
o1 endsub
|
||||
|
||||
o2 sub
|
||||
g0 x2y2z2
|
||||
(debug,executing this one)
|
||||
o2 endsub
|
||||
|
||||
o<multipass> sub
|
||||
#<sub> = 2
|
||||
o#<sub> call
|
||||
o<multipass> endsub
|
||||
|
||||
o<multipass> call
|
||||
|
||||
m2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315-p2/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
test for http://sourceforge.net/p/emc/bugs/315/, first case
|
||||
18
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/expected
vendored
Normal file
18
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/expected
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... MESSAGE("running sub")
|
||||
N..... MESSAGE("breaking out of sub")
|
||||
N..... MESSAGE("done")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
14
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/test.ngc
vendored
Normal file
14
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/test.ngc
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
o123 sub
|
||||
o200 if [5 le 0.01]
|
||||
o123 return
|
||||
o200 endif
|
||||
o124 while [1]
|
||||
(debug,breaking out of sub)
|
||||
o124 break
|
||||
o124 endwhile
|
||||
o123 endsub
|
||||
|
||||
(debug,running sub)
|
||||
o123 call
|
||||
(debug,done)
|
||||
m02
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/oword-bug315/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/README
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/README
vendored
Normal file
@@ -0,0 +1 @@
|
||||
Tests for proper unwind in a failed external o-word procedure.
|
||||
16
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/expected
vendored
Normal file
16
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/expected
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... MESSAGE(" pre divide-by-zero")
|
||||
N..... MESSAGE(" pre divide-by-zero")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
9
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/fail.ngc
vendored
Normal file
9
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/fail.ngc
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
(debug, pre <fail>)
|
||||
o<fail> sub
|
||||
(debug, pre divide-by-zero)
|
||||
#100 = [1/0]
|
||||
(debug, post divide-by-zero)
|
||||
o<fail> endsub
|
||||
(debug, post <fail>)
|
||||
m2
|
||||
|
||||
4
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.ini
vendored
Normal file
4
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.ini
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[RS274NGC]
|
||||
SUBROUTINE_PATH=.
|
||||
|
||||
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.ngc
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.ngc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
o<fail> call
|
||||
o<fail> call
|
||||
M2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/oword-unwind/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -n 0 -i test.ini -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
20
wasm-port/vendor/linuxcnc/tests/interp/return-value/expected
vendored
Normal file
20
wasm-port/vendor/linuxcnc/tests/interp/return-value/expected
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
N..... ON_RESET()
|
||||
N..... MESSAGE("line 6.000000: _value: - expected 0.000000, got 0.000000")
|
||||
N..... MESSAGE("line 28.000000: call with arg1=2.000000 expect 246.000000, got 246.000000")
|
||||
N..... MESSAGE("line 37.000000: call with arg1=-1.000000 expect 0.000000, got 0.000000")
|
||||
N..... MESSAGE("line 47.000000: call with arg1=0.000000 expect 4712.000000, got 4712.000000")
|
||||
N..... MESSAGE("line 53.000000: _value=4712.000000 - expected 4712.000000")
|
||||
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
N..... SET_XY_ROTATION(0.0000)
|
||||
N..... SET_FEED_MODE(0, 0)
|
||||
N..... SET_FEED_RATE(0.0000)
|
||||
N..... STOP_SPINDLE_TURNING(0)
|
||||
N..... SET_SPINDLE_MODE(0 0.0000)
|
||||
N..... PROGRAM_END()
|
||||
N..... ON_RESET()
|
||||
N..... ON_RESET()
|
||||
55
wasm-port/vendor/linuxcnc/tests/interp/return-value/test.ngc
vendored
Normal file
55
wasm-port/vendor/linuxcnc/tests/interp/return-value/test.ngc
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
; test that #<_value> is accessible and is 0
|
||||
|
||||
; test for proper initialization of #<_value> if program is re-run
|
||||
; see note at end of program
|
||||
#<expect> = 0
|
||||
(debug,line #<_line>: _value: - expected #<expect>, got #<_value>)
|
||||
o200 if [#<_value> NE 0]
|
||||
(debug, fail: _value=#<_value> - expecting 0)
|
||||
o200 endif
|
||||
|
||||
|
||||
o1000 sub
|
||||
o1010 if [#1 GT 0]
|
||||
o1010 return [123*[#1]]
|
||||
o1010 endif
|
||||
|
||||
o1020 if [#1 LT 0]
|
||||
o1020 return
|
||||
o1020 endif
|
||||
|
||||
o1000 endsub [4712]
|
||||
|
||||
|
||||
; test returning value via 'return'
|
||||
#<arg> = 2
|
||||
#<expect> = 246
|
||||
o1000 call [#<arg>]
|
||||
(debug,line #<_line>: call with arg1=#<arg> expect #<expect>, got #<_value>)
|
||||
o3000 if [#<_value> NE #<expect>]
|
||||
(debug,line #<_line>: 'return' return value=#<_value> - expected #<expect>)
|
||||
o3000 endif
|
||||
|
||||
; test returning no value at all - plain old style 'return'
|
||||
#<arg> = -1
|
||||
#<expect> = 0
|
||||
o1000 call [#<arg>]
|
||||
(debug,line #<_line>: call with arg1=#<arg> expect #<expect>, got #<_value>)
|
||||
o4000 if [#<_value> NE #<expect>]
|
||||
(debug,line #<_line>: 'plain return' return value=#<_value> - expected #<expect>)
|
||||
o4000 endif
|
||||
|
||||
|
||||
; test returning value via 'endsub'
|
||||
#<arg> = 0
|
||||
#<expect> = 4712
|
||||
o1000 call [#<arg>]
|
||||
(debug,line #<_line>: call with arg1=#<arg> expect #<expect>, got #<_value>)
|
||||
o2000 if [#<_value> NE #<expect>]
|
||||
(debug,line #<_line>: 'endsub' return value=#<_value> - expected #<expect>)
|
||||
o2000 endif
|
||||
|
||||
; note #<_value> is 4712 at this point.
|
||||
(debug,line #<_line>: _value=#<_value> - expected #<expect>)
|
||||
|
||||
m2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/return-value/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/return-value/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc | awk '{$1=""; print}'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
28
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/expected
vendored
Normal file
28
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/expected
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
N..... MESSAGE("0.000000 0.000000 0.000000")
|
||||
N..... MESSAGE("1.000000 2.000000 3.000000")
|
||||
48
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.ngc
vendored
Normal file
48
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.ngc
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
; Repeatedly move to 0,0,0 and 1,2,3 in machine coordinates,
|
||||
; but with different offsets in effect; check that in each case,
|
||||
; the values in #544x match the just-commanded g53 move
|
||||
o<coords> sub
|
||||
g53g0x0y0z0
|
||||
(debug,#<_abs_x> #<_abs_y> #<_abs_z>)
|
||||
g53g0x1y2z3
|
||||
(debug,#<_abs_x> #<_abs_y> #<_abs_z>)
|
||||
o<coords> endsub
|
||||
|
||||
o<suite> sub
|
||||
g54
|
||||
g92.2
|
||||
g10l2p1x0y0z0r0
|
||||
o<coords> call
|
||||
|
||||
g10l2p1x3y7z0r0
|
||||
o<coords> call
|
||||
|
||||
g10l2p1x0y0r45
|
||||
o<coords> call
|
||||
|
||||
g10l2p1x3y7z0r45
|
||||
o<coords> call
|
||||
|
||||
g10l2p1x0y0z0r0
|
||||
g92x3y7
|
||||
o<coords> call
|
||||
g92.2
|
||||
|
||||
g10l2p1x3y7z0r0
|
||||
g92x3y7
|
||||
o<coords> call
|
||||
g92.2
|
||||
|
||||
g10l2p1x3y7z0r45
|
||||
g92x3y7
|
||||
o<coords> call
|
||||
g92.2
|
||||
o<suite> endsub
|
||||
|
||||
g20
|
||||
o<suite> call
|
||||
|
||||
g21
|
||||
o<suite> call
|
||||
|
||||
m2
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.sh
vendored
Normal file
3
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g test.ngc -t test.tbl | awk '/MESSAGE/ {$1=""; print}' | sed 's/-0\.0000/0.0000/g'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
1
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.tbl
vendored
Normal file
1
wasm-port/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.tbl
vendored
Normal file
@@ -0,0 +1 @@
|
||||
t1 p1 x0 y0 z0
|
||||
27
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/expected
vendored
Normal file
27
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/expected
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("interpreter: setting coordinate system origin")
|
||||
8 N..... COMMENT("interpreter: setting coordinate system origin")
|
||||
9 N..... SET_G5X_OFFSET(2, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
10 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
11 N..... SET_XY_ROTATION(45.0000)
|
||||
12 N..... COMMENT("G55 10,10")
|
||||
13 N..... STRAIGHT_TRAVERSE(10.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
14 N..... COMMENT("G55 G28")
|
||||
15 N..... STRAIGHT_TRAVERSE(10.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
16 N..... STRAIGHT_TRAVERSE(10.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
17 N..... SET_G5X_OFFSET(3, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
18 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
19 N..... SET_XY_ROTATION(0.0000)
|
||||
20 N..... COMMENT("G56 cp")
|
||||
21 N..... STRAIGHT_TRAVERSE(0.0000, 14.1421, 0.0000, 1.0000, 0.0000, 0.0000)
|
||||
22 N..... COMMENT("G56 G28")
|
||||
23 N..... STRAIGHT_TRAVERSE(0.0000, 14.1421, 0.0000, 1.0000, 0.0000, 0.0000)
|
||||
24 N..... STRAIGHT_TRAVERSE(0.0000, 14.1421, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
25 N..... FINISH()
|
||||
26 N..... ON_RESET()
|
||||
27 N..... ON_RESET()
|
||||
15
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/g28.ngc
vendored
Normal file
15
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/g28.ngc
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
%
|
||||
G10 L2 P2 X0 Y0 R45; G55
|
||||
G10 L2 P3 X0 Y0; G56
|
||||
G55
|
||||
(G55 10,10)
|
||||
G0 x10 y10
|
||||
G28.1
|
||||
(G55 G28)
|
||||
G28
|
||||
G56
|
||||
(G56 cp)
|
||||
G0 a1
|
||||
(G56 G28)
|
||||
G28
|
||||
%
|
||||
3
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/test.sh
vendored
Executable file
3
wasm-port/vendor/linuxcnc/tests/interp/rotation/g28/test.sh
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
rs274 -g g28.ngc | sed 's/-0\.0000/0.0000/g'
|
||||
exit "${PIPESTATUS[0]}"
|
||||
30
wasm-port/vendor/linuxcnc/tests/interp/rotation/g53/expected
vendored
Normal file
30
wasm-port/vendor/linuxcnc/tests/interp/rotation/g53/expected
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
|
||||
2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
4 N..... SET_XY_ROTATION(0.0000)
|
||||
5 N..... SET_FEED_REFERENCE(CANON_XYZ)
|
||||
6 N..... ON_RESET()
|
||||
7 N..... COMMENT("interpreter: setting coordinate system origin")
|
||||
8 N..... COMMENT("interpreter: setting coordinate system origin")
|
||||
9 N..... SET_G5X_OFFSET(2, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
10 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
11 N..... SET_XY_ROTATION(45.0000)
|
||||
12 N..... COMMENT("g55 to 1,1")
|
||||
13 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
14 N..... COMMENT("g53 + g55 to 1,1")
|
||||
15 N..... STRAIGHT_TRAVERSE(1.4142, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
16 N..... SET_G92_OFFSET(1.4142, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
17 N..... COMMENT("g55 + g92 to 1,1")
|
||||
18 N..... STRAIGHT_TRAVERSE(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
19 N..... COMMENT("g53 + g55 + g92 to 1,1")
|
||||
20 N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
21 N..... SET_G5X_OFFSET(3, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
22 N..... SET_G92_OFFSET(1.4142, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
|
||||
23 N..... SET_XY_ROTATION(0.0000)
|
||||
24 N..... COMMENT("g56 + g92 to cp")
|
||||
25 N..... STRAIGHT_TRAVERSE(-0.4142, 1.0000, 0.0000, 1.0000, 0.0000, 0.0000)
|
||||
26 N..... COMMENT("g53 + g56 + g92 to 1,1")
|
||||
27 N..... STRAIGHT_TRAVERSE(-0.4142, 1.0000, 0.0000, 1.0000, 0.0000, 0.0000)
|
||||
28 N..... FINISH()
|
||||
29 N..... ON_RESET()
|
||||
30 N..... ON_RESET()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user