]> git.draconx.ca Git - slotifier.git/blob - tests/simple.at
Trivial manual fixes.
[slotifier.git] / tests / simple.at
1 # Copyright © 2018, 2021 Nick Bowler
2 #
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
15
16 AT_SETUP([basic operation])
17
18 AT_DATA([test.cnc],
19 [[M48
20 INCH
21 T20C0.020
22 T19C0.035
23 %
24 T20
25 X001000Y003000
26 X001100Y003000
27 X001200Y003000
28 X001300Y003000
29 X001400Y003000
30 T19
31 X001000Y002300
32 X001000Y001600
33 X001100Y002300
34 X001200Y002300
35 X001700Y002600
36 M30
37 ]])
38
39 AT_CHECK([slotifier test.cnc], [0],
40 [[M48
41 INCH,TZ
42 T10C0.035
43 T11C0.020
44 %
45 T10
46 X001000Y002300G85X001200Y002300
47 X001000Y001600
48 X001700Y002600
49 T11
50 X001000Y003000G85X001400Y003000
51 M30
52
53 ]])
54
55 AT_CLEANUP
56
57 AT_SETUP([non-overlapping holes])
58
59 AT_DATA([test.cnc],
60 [[M48
61 INCH
62 T25C0.010
63 T24C0.091
64 %
65 T25
66 X010433Y001181
67 T24
68 X010512Y002362
69 X010512Y002047
70 M30
71 ]])
72
73 AT_CHECK([slotifier test.cnc], [0],
74 [[M48
75 INCH,TZ
76 T10C0.091
77 T11C0.010
78 %
79 T10
80 X010512Y002362G85X010512Y002047
81 T11
82 X010433Y001181
83 M30
84
85 ]])
86
87 AT_CLEANUP
88
89 AT_SETUP([no holes])
90
91 AT_DATA([test.cnc],
92 [[M48
93 INCH,TZ
94 T10C0.091
95 %
96 T10
97 X010512Y002362G85X010512Y002047
98 M30
99 ]])
100
101 AT_CHECK([slotifier test.cnc], [0],
102 [[M48
103 INCH,TZ
104 T10C0.091
105 %
106 T10
107 X010512Y002362G85X010512Y002047
108 M30
109
110 ]])
111
112 AT_CLEANUP
113
114 AT_SETUP([asymmetric overlap])
115
116 AT_DATA([test.cnc],
117 [[M48
118 INCH
119 T25C0.025
120 T24C0.050
121 %
122 T25
123 X010200Y010000
124 X010300Y010000
125 T24
126 X010000Y010000
127 M30
128 ]])
129
130 AT_CHECK([slotifier test.cnc], [0],
131 [[M48
132 INCH,TZ
133 T10C0.050
134 T11C0.025
135 %
136 T10
137 X010000Y010000G85X010300Y010000
138 T11
139 M30
140
141 ]])
142
143 AT_CLEANUP
144
145 AT_SETUP([asymmetric overlap #2])
146
147 AT_DATA([test.cnc],
148 [[M48
149 INCH
150 T25C0.030
151 T24C0.100
152 %
153 T25
154 X010400Y010250
155 T24
156 X010800Y010000
157 X010000Y010000
158 M30
159 ]])
160
161 AT_CHECK([slotifier test.cnc], [0],
162 [[M48
163 INCH,TZ
164 T10C0.100
165 T11C0.030
166 %
167 T10
168 X010800Y010000G85X010000Y010000
169 T11
170 M30
171
172 ]])
173
174 AT_CLEANUP