Expand LinuxCNC interpreter regression coverage

This commit is contained in:
2026-06-09 14:54:54 +08:00
parent 50757e45ba
commit 5bd8f12872
143 changed files with 10895 additions and 219 deletions

View File

@@ -0,0 +1,50 @@
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..... SELECT_TOOL(3)
N..... STOP_SPINDLE_TURNING(0)
N..... CHANGE_TOOL()
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_FEED_RATE(100.0000)
N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
N..... ARC_FEED(1.0000, 0.0000, 1.5000, -0.5000, 1, 0.5000, 0.0000, 0.0000, 0.0000)
N..... ARC_FEED(0.0000, 1.0000, 1.0000, 1.0000, -1, 0.5000, 0.0000, 0.0000, 0.0000)
N..... ARC_FEED(1.0000, 2.0000, -0.8229, 2.8229, 1, 0.9000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(2.0000, 1.0000, 0.7000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("This is perverse on purpose.")
N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000)
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: cutter radius compensation on left")
N..... ARC_FEED(1.0884, -0.0884, 1.5979, -0.5979, 1, 0.0000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: distance mode changed to incremental")
N..... ARC_FEED(1.0000, -0.1250, 1.0000, 0.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000)
N..... ARC_FEED(-0.1250, 1.0000, 1.0000, 1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: distance mode changed to absolute")
N..... ARC_FEED(-0.0514, 1.1139, 0.0000, 1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000)
N..... ARC_FEED(0.8861, 2.0514, -0.8229, 2.8229, 1, 0.4000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: distance mode changed to incremental")
N..... ARC_FEED(1.0884, 2.0884, 1.0000, 2.0000, -1, 0.4000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(2.0884, 1.0884, 0.2000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: distance mode changed to absolute")
N..... ARC_FEED(2.0884, 0.9116, 2.0000, 1.0000, -1, 0.2000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(1.0884, -0.0884, 0.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(1.0884, -0.0884, 1.0000, 0.0000, 0.0000, 0.0000)
N..... COMMENT("interpreter: cutter radius compensation off")
N..... SET_G92_OFFSET(0.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()

View File

@@ -0,0 +1,28 @@
G20
T3 M6
G0 X0 Y0
F100
G0 Z1
X2Y0
G3 X1Y0 R[.5*SQRT[2]] Z.5
G2 X0Y1 R1
G3 X1Y2Z.9 R2
G1 X2Y1Z.7
X1Y0Z.5
G0Z1
(This is perverse on purpose.)
G0 Z1
G92 Z.5
X2Y0
G41
G3 X1Y0 R[.5*SQRT[2]] Z0
G91 G2 X-1Y1 R1
G90 G3 X1Y2Z.4 R2
G91 G1 X1Y-1Z-.2
G90 X1Y0Z0
G0Z1
G40
G92.1
M2

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -0,0 +1,5 @@
T1 P1 Z0.5 D0.0625;first tool
T2 P2 Z0.7 D0.125;
T3 P3 Z0.5 D0.25;
T4 P4 Z0.7 D1.0;
T32 P32 Z0.5 D0.0;last tool