@@ -122,3 +122,136 @@ game_system = "DiceBot"
122122input = " choice[, ,, ,, ,] 要素数ゼロ"
123123output = " "
124124rands = []
125+
126+ [[ test ]]
127+ game_system = " DiceBot"
128+ input = " choice2[The Call of Cthulhu, The Shadow Over Innsmouth, The Shadow Out of Time] 複数個取得"
129+ output = " (choice2[The Call of Cthulhu,The Shadow Over Innsmouth,The Shadow Out of Time]) > The Shadow Out of Time, The Call of Cthulhu"
130+ rands = [
131+ { sides = 3 , value = 3 },
132+ { sides = 2 , value = 1 },
133+ ]
134+
135+ [[ test ]]
136+ game_system = " DiceBot"
137+ input = " choice2(a,b,c) かっこ区切り"
138+ output = " (choice2(a,b,c)) > a, b"
139+ rands = [
140+ { sides = 3 , value = 1 },
141+ { sides = 2 , value = 1 },
142+ ]
143+
144+ # 空白区切り
145+ [[ test ]]
146+ game_system = " DiceBot"
147+ input = " choice2 a b c"
148+ output = " (choice2 a b c) > a b"
149+ rands = [
150+ { sides = 3 , value = 1 },
151+ { sides = 2 , value = 1 },
152+ ]
153+
154+ [[ test ]]
155+ game_system = " DiceBot"
156+ input = " choice3[A(), B(), C()] 全部取る"
157+ output = " (choice3[A(),B(),C()]) > A(), C(), B()"
158+ rands = [
159+ { sides = 3 , value = 1 },
160+ { sides = 2 , value = 2 },
161+ { sides = 1 , value = 1 },
162+ ]
163+
164+ [[ test ]]
165+ game_system = " DiceBot"
166+ input = " choice0[abc,def] 0個とる"
167+ output = " "
168+ rands = []
169+
170+ [[ test ]]
171+ game_system = " DiceBot"
172+ input = " choice3[abc,def] とる数が多い"
173+ output = " "
174+ rands = []
175+
176+ [[ test ]]
177+ game_system = " DiceBot"
178+ input = " choice[A-F] 複数要素の省略形"
179+ output = " (choice[A,B,C,D,E,F]) > C"
180+ rands = [
181+ { sides = 6 , value = 3 },
182+ ]
183+
184+ [[ test ]]
185+ game_system = " DiceBot"
186+ input = " choice[c-g] 複数要素の省略形"
187+ output = " (choice[c,d,e,f,g]) > g"
188+ rands = [
189+ { sides = 5 , value = 5 },
190+ ]
191+
192+ [[ test ]]
193+ game_system = " DiceBot"
194+ input = " choice[3-10] 複数要素の省略形"
195+ output = " (choice[3,4,5,6,7,8,9,10]) > 10"
196+ rands = [
197+ { sides = 8 , value = 8 },
198+ ]
199+
200+ # 複数要素の省略形 空白区切り
201+ [[ test ]]
202+ game_system = " DiceBot"
203+ input = " choice A-F"
204+ output = " (choice A B C D E F) > C"
205+ rands = [
206+ { sides = 6 , value = 3 },
207+ ]
208+
209+ [[ test ]]
210+ game_system = " DiceBot"
211+ input = " choice(A-F) 複数要素の省略形 カッコ区切り"
212+ output = " (choice(A,B,C,D,E,F)) > C"
213+ rands = [
214+ { sides = 6 , value = 3 },
215+ ]
216+
217+ [[ test ]]
218+ game_system = " DiceBot"
219+ input = " choice[F-A] 大小関係が逆"
220+ output = " "
221+ rands = []
222+
223+ [[ test ]]
224+ game_system = " DiceBot"
225+ input = " choice[g-c] 大小関係が逆"
226+ output = " "
227+ rands = []
228+
229+ [[ test ]]
230+ game_system = " DiceBot"
231+ input = " choice[10-3] 大小関係が逆"
232+ output = " "
233+ rands = []
234+
235+ [[ test ]]
236+ game_system = " DiceBot"
237+ input = " choice[a-zz] 複数文字では省略にならない"
238+ output = " "
239+ rands = []
240+
241+ [[ test ]]
242+ game_system = " DiceBot"
243+ input = " choice[A-F, Z] こういうケースでは展開しない"
244+ output = " (choice[A-F,Z]) > A-F"
245+ rands = [
246+ { sides = 2 , value = 1 },
247+ ]
248+
249+ [[ test ]]
250+ game_system = " DiceBot"
251+ input = " choice3[A-F] 複数選択との混合"
252+ output = " (choice3[A,B,C,D,E,F]) > C, F, A"
253+ rands = [
254+ { sides = 6 , value = 3 },
255+ { sides = 5 , value = 5 },
256+ { sides = 4 , value = 1 },
257+ ]
0 commit comments