interp: regression test for correct unwind after failed external oword procedure
This test requires rs274 inifile support (-i <inifile>).
This commit is contained in:
parent
786ee724e4
commit
bc1fd41ece
7 changed files with 50 additions and 0 deletions
1
tests/interp/oword-unwind/README
Normal file
1
tests/interp/oword-unwind/README
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Tests for proper unwind in a failed external o-word procedure.
|
||||||
14
tests/interp/oword-unwind/expected
Normal file
14
tests/interp/oword-unwind/expected
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
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..... 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)
|
||||||
|
N..... SET_FEED_RATE(0.0000)
|
||||||
|
N..... STOP_SPINDLE_TURNING()
|
||||||
|
N..... SET_SPINDLE_MODE(0.0000)
|
||||||
|
N..... PROGRAM_END()
|
||||||
16
tests/interp/oword-unwind/expected.pre-failed-oword-patch
Normal file
16
tests/interp/oword-unwind/expected.pre-failed-oword-patch
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..... MESSAGE(" pre divide-by-zero")
|
||||||
|
N..... MESSAGE(" post divide-by-zero")
|
||||||
|
N..... MESSAGE(" pre divide-by-zero")
|
||||||
|
N..... MESSAGE(" post 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)
|
||||||
|
N..... SET_FEED_RATE(0.0000)
|
||||||
|
N..... STOP_SPINDLE_TURNING()
|
||||||
|
N..... SET_SPINDLE_MODE(0.0000)
|
||||||
|
N..... PROGRAM_END()
|
||||||
9
tests/interp/oword-unwind/fail.ngc
Normal file
9
tests/interp/oword-unwind/fail.ngc
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
tests/interp/oword-unwind/test.ini
Normal file
4
tests/interp/oword-unwind/test.ini
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[RS274NGC]
|
||||||
|
SUBROUTINE_PATH=.
|
||||||
|
|
||||||
|
|
||||||
3
tests/interp/oword-unwind/test.ngc
Normal file
3
tests/interp/oword-unwind/test.ngc
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
o<fail> call
|
||||||
|
o<fail> call
|
||||||
|
M2
|
||||||
3
tests/interp/oword-unwind/test.sh
Normal file
3
tests/interp/oword-unwind/test.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
rs274 -n 0 -i test.ini -g test.ngc | awk '{$1=""; print}'
|
||||||
|
exit ${PIPESTATUS[0]}
|
||||||
Loading…
Reference in a new issue