1 Now slightly out-of-date version of what is in Makefile.
5 + Input file containing games with
17 - Resulting output should be that the game input on standard input is
18 formatted as PGN on standard output.
20 Contents of fools-mate.pgn on standard output.
21 - Command: pgn-extract < fools-mate.txt
24 - Input file(s): fools-mate.txt
25 - Resulting output should be the input formatted as PGN on standard output.
26 - Expected output: Contents of fools-mate.pgn should appear on standard output.
27 - Command: pgn-extract fools-mate.txt
30 + Input file with games having tags additional to the seven tag roster.
31 - Input file(s): test-7.pgn
32 - Game output should have only the tags of the seven tag roster.
33 - Expected output: test-7-out.pgn
34 - Command: pgn-extract -7 -otest-7-out.pgn test-7.pgn
37 + Input file containing games in any accepted format.
38 - Input file(s): test-a.txt
39 - Resulting output should contain two versions of the input game
40 formatted in PGN. The --output command is run first to create
41 a new file, then the -a version to append to that file.
42 - Expected output: test-a-out.pgn
43 - Command: pgn-extract --output test-a-out.pgn test-a.txt
44 pgn-extract -atest-a-out.pgn test-a.txt
46 - Command: pgn-extract --output test-a-out.pgn test-a.txt
47 pgn-extract --append test-a-out.pgn test-a.txt
50 + Input file containing games and a file of arguments.
51 - Input file(s): fischer.pgn, petrosian.pgn, arglist.txt
52 - Resulting output should be files separating the unique and
53 duplicated games in the input files.
54 - Expected output: test-A-unique.pgn, test-A-dupes.pgn
55 - Command: pgn-extract -Aargslist.txt
58 + Input file containing games of different length.
59 - Input file(s): fischer.pgn
60 - Resulting output: games whose number of moves is within
63 - Expected output: 45 moves or more: fischer-bl45-out.pgn
64 - Command: pgn-extract -bl45 -ofischer-bl45-out.pgn fischer.pgn
66 - Expected output: 45 moves or less: fischer-bu45-out.pgn
67 - Command: pgn-extract -bu45 -ofischer-bu45-out.pgn fischer.pgn
69 - Expected output: exactly 30 moves: fischer-b30-out.pgn
70 - Command: pgn-extract -b30 -ofischer-b30-out.pgn fischer.pgn
74 + Input files containing games.
75 - Input file(s): fischer.pgn, petrosian.pgn
76 - Resulting output should contain matched games that do not already occur in
78 - Expected output: test-c-out.pgn
79 - Command: pgn-extract -cpetrosian.pgn -D -TpPetrosian -otest-c-out.pgn fischer.pgn
80 - Command: pgn-extract -cclist.txt -D -TpPetrosian -otest-c-out.pgn fischer.pgn
83 + Input file containing games with comments
84 - Input file(s): test-C.pgn
85 - Resulting output should have all comments removed.
86 - Expected output: test-C-out.pgn
87 - Command: pgn-extract -C -otest-C-out.pgn test-C.pgn
90 + Input file containing games with duplicates and non-duplicates.
91 - Input file(s): fischer.pgn, petrosian.pgn
92 - Resulting output should be files separating the unique and
93 duplicated games in the input files.
94 - Expected output: test-d-unique.pgn, test-d-dupes.pgn
95 - Command: pgn-extract -dtest-d-dupes.pgn -otest-d-unique.pgn fischer.pgn petrosian.pgn
98 + Input file containing games with duplicates and non-duplicates.
99 - Input file(s): fischer.pgn, petrosian.pgn
100 - Resulting output should be a file containing the combined input
101 with duplicate games removed.
102 - Expected output: test-D-unique.pgn
103 - Command: pgn-extract -D -otest-D-unique.pgn fischer.pgn petrosian.pgn
104 - Command: pgn-extract --noduplicates -otest-D-unique.pgn fischer.pgn petrosian.pgn
107 + Input file containing games without ECO classifications.
108 - Input file(s): test-e.pgn and eco.pgn in the test folder.
109 - Resulting output should have ECO classification added to the tags.
110 - Expected output: test-e-out.pgn
111 - Command: pgn-extract -e -otest-e-out.pgn test-e.pgn
112 - Command: pgn-extract -eeco.pgn -otest-e-out.pgn test-e.pgn
115 + Input file containing games.
116 - Input file(s): test-E.pgn and eco.pgn if -e flag is used.
117 - Resulting output should be separate files for each ECO classification
118 at the level of the initial letter (A-E).
119 - Expected output: A.pgn, B.pgn, E.pgn
120 - Command: pgn-extract -e -E1 test-E.pgn
123 + Input files containing games.
124 - Input file(s): test-f1.pgn, test-f2.pgn, files.txt
125 - Resulting output should be the combination of the input files.
126 - Expected output: test-f-out.pgn
127 - Command: pgn-extract -ffiles.txt -otest-f-out.pgn
130 + Input file containing games without a trailing FEN comment.
131 - Input file(s): test-F.pgn
132 - Resulting output should have a comment at the end containing
133 the FEN description of the final position.
134 - Expected output: test-F-out.pgn
135 - Command: pgn-extract -F -otest-F-out.pgn test-F.pgn
141 - Resulting output should be a description of how to use pgn-extract
142 - Expected output: N/A
143 - Command: pgn-extract -h
144 - Command: pgn-extract -?
145 - Command: pgn-extract --help
148 + Input file containing games.
149 - Input file(s): fischer.pgn
150 - Resulting output: List of games parsed written to log.txt
151 - Expected output: log.txt
152 - Command: pgn-extract -llog.txt -otest-l-out.pgn fischer.pgn
155 + Input file containing games.
156 - Input file(s): test-L1.pgn, test-L2.pgn
157 - Resulting output should be that log.txt contains the combined
158 logs from two runs of pgn-extract.
159 - Expected output: log.txt
160 - Command: pgn-extract -llog.txt -r test-L1.pgn
161 pgn-extract -Llog.txt -r test-L2.pgn
164 + Input file containing games.
165 - Input file(s): test-checkmate.pgn
166 - Resulting output should contain only those games that end in checkmate.
167 - Expected output: test-checkmate-out.pgn
168 - Command: pgn-extract --checkmate -otest-checkmate-out.pgn test-checkmate.pgn
171 + Input file containing games.
172 - Input file(s): petrosian.pgn
173 - Resulting output should be separate files containing matched
174 and non-matched games.
175 - Expected output: test-n-matched.pgn, test-n-unmatched.pgn
176 - Command: pgn-extract -TpFischer -otest-n-matched.pgn -ntest-n-unmatched.pgn petrosian.pgn
179 + Input file containing games with NAGs.
180 - Input file(s): test-N.pgn
181 - Resulting output should have all NAGs removed.
182 - Expected output: test-N-out.pgn
183 - Command: pgn-extract -N -otest-N-out.pgn test-N.pgn
187 + Input file containing games in any accepted format.
188 - Input file(s): test-o.txt
189 - Resulting output should contain the input game formatted in PGN.
190 - Expected output: test-o-out.pgn
191 - Command: pgn-extract -otest-o-out.pgn test-o.txt
192 - Command: pgn-extract --output test-o-out.pgn test-o.txt
195 + Input file containing games with different sequences for the same
197 - Input file(s): test-P.pgn, Pvars.txt
198 - Resulting output should be games whose opening move exactly match
199 the sequence specified in Pvars.txt
200 - Expected output: test-P-out.pgn
201 - Command: pgn-extract -P -vPvars.txt -otest-P-out.pgn test-P.pgn
204 + Input file containing games in any accepted format.
205 - Input file(s): test-r.text
206 - Resulting output should contain tag summary lines for the games
207 matched and a report of any errors.
208 - Expected output: test-r-log.text
209 - Command: pgn-extract -r -Ltest-r-log.txt test-r.txt
212 + Input file containing games.
213 - Input file(s): test-R.pgn, roster.txt
214 - Resulting output should contain games with their tag roster in
215 the order specified in roster.txt
216 - Expected output: test-R-out.pgn
217 - Command: pgn-extract -Rroster.txt --output test-R-out.pgn test-R.pgn
220 + Input file containing games.
221 - Input file(s): test-s.pgn
222 - Resulting output should be silent, with games written to the output file.
223 - Expected output: test-s-out.pgn
224 - Command: pgn-extract -s -o test-s-out.pgn test-s.pgn
227 + Input file containing games whose players' names have slight
228 sound variations from anglesized versions.
229 - Input file(s): test-S.pgn
230 - Resulting output should be games that match by ignoring slight
232 - Expected output: test-S-out.pgn
233 - Command: pgn-extract -S -TpPetrosian -otest-S-out.pgn test-S.pgn
236 + Input file containing games and a file of tag criteria.
237 - Input file(s): test-t.pgn, taglist.txt
238 - Resulting output should be only those games whose tags match
240 - Expected output: test-t-out.pgn
241 - Command: pgn-extract -ttaglist.txt -otest-t-out.pgn test-t.pgn
244 + Input file containing games with tag information.
245 - Input file(s): fischer.pgn, test-Ta.pgn (and eco.pgn for -Te test.)
246 - Resulting output should contain only those games whose tag information
247 matches that specified.
248 - Expected output: test-Ta-out.pgn, test-Tb-out.pgn, test-Td-out.pgn,
249 test-Te-out.pgn, test-Tp-out.pgn, test-Tw-out.pgn
250 - Command: pgn-extract -Td1970 -otest-Td-out.pgn fischer.pgn
251 - Command: pgn-extract -TbPetrosian -otest-Tb-out.pgn fischer.pgn
252 - Command: pgn-extract -e -TeB14 -otest-Te-out.pgn fischer.pgn
253 - Command: pgn-extract -TpPetrosian -otest-Tp-out.pgn fischer.pgn
254 - Command: pgn-extract -Tr0-1 -otest-Tr-out.pgn fischer.pgn
255 - Command: pgn-extract -TwFischer -otest-Tw-out.pgn fischer.pgn
256 - Command: pgn-extract -TaBarnes -otest-Ta-out.pgn test-Ta.pgn
259 + Input file containing games with duplicates and non-duplicates.
260 - Input file(s): fischer.pgn, petrosian.pgn
261 - Resulting output should be a file containing just the duplicate games.
262 - Expected output: test-U-unique.pgn
263 - Command: pgn-extract -U -otest-U-unique.pgn fischer.pgn petrosian.pgn
264 - Command: pgn-extract --nounique -otest-U-unique.pgn fischer.pgn petrosian.pgn
267 + Input file containing games.
268 - Input file(s): najdorf.pgn, vvars.txt
269 - Resulting output should be only those games whose opening moves
270 textually match (in any order) the moves in vars.txt.
271 - Expected output: test-v-out.pgn
272 - Command: pgn-extract -vvvars.txt -otest-v-out.pgn najdorf.pgn
275 + Input file containing games with variations
276 - Input file(s): test-V.pgn
277 - Resulting output should have all variations removed.
278 - Expected output: test-V-out.pgn
279 - Command: pgn-extract -V -otest-V-out.pgn test-V.pgn
282 + Input file containing games.
283 - Input file(s): test-w.pgn
284 - Resulting output Games formatted up to the specified line length.
286 - Expected output: test-w60-out.pgn, test-w75-out.pgn, test-w1000-out.pgn
287 - Command: pgn-extract -w60 -otest-w60-out.pgn test-w.pgn
288 - Command: pgn-extract -w75 -otest-w75-out.pgn test-w.pgn
289 - Command: pgn-extract -w1000 -otest-w1000-out.pgn test-w.pgn
291 - Command: pgn-extract --linelength 60 -otest-w60-out.pgn test-w.pgn
292 - Command: pgn-extract --linelength 75 -otest-w75-out.pgn test-w.pgn
293 - Command: pgn-extract --linelength 1000 -otest-w1000-out.pgn test-w.pgn
296 + Input file containing games.
297 - Input file(s): test-W.pgn
298 - Resulting output should be games formatted in the specified notation:
299 halg (hyphenated long algebraic), lalg (non-hyphenated long algebraic),
300 elalg (enhanced long algebraic), and alternative piece letters.
301 - Expected output: test-Whalg-out.pgn, test-Wlalg-out.pgn,
302 test-elalg-out.pgn, test-Wdeutsch-out.pgn
303 - Command: pgn-extract -Whalg -otest-Whalg-out.pgn test-W.pgn
304 - Command: pgn-extract -Wlalg -otest-Wlalg-out.pgn test-W.pgn
305 - Command: pgn-extract -Welalg -otest-Welalg-out.pgn test-W.pgn
306 - Command: pgn-extract -WsanBSLTDK -otest-Wdeutsch-out.pgn test-W.pgn
309 + Input file containing games.
310 - Input file(s): najdorf.pgn, xvars.txt
311 - Resulting output should be only those games which match
312 the result of reaching the opening sequence in vars.txt.
313 - Expected output: test-x-out.pgn
314 - Command: pgn-extract -xxvars.txt -otest-x-out.pgn najdorf.pgn
317 + Input file containing games with duplicates and non-duplicates.
318 - Input file(s): fischer.pgn, petrosian.pgn
319 - Resulting output should be files separating the unique and
320 duplicated games in the input files.
321 - Expected output: test-Z-unique.pgn, test-Z-dupes.pgn
322 - Command: pgn-extract -Z -dtest-Z-dupes.pgn -otest-Z-unique.pgn fischer.pgn petrosian.pgn
325 + Input file containing games.
326 - Input file(s): petrosian.pgn, zmatch.txt
327 - Resulting output should be games whose material balance matches that
328 specified in zmatch.txt
329 - Expected output: test-z-out.pgn
330 - Command: pgn-extract -zzmatch.txt -otest-z-out.pgn petrosian.pgn
333 + Input file containing games.
334 - Input file(s): test-hash.pgn
335 - Resulting output The input file split in to separate sub-files,
336 each containing 10 games, except the last which may contain fewer.
337 - Expected output: 1.pgn, 2.pgn
338 - Command: pgn-extract -#20 test-hash.pgn
341 + Input file containing games.
342 - Input file(s): test-evaluation.pgn
343 - Resulting output should include an evaluation value in a comment
345 - Expected output: test-evaluation-out.pgn
346 - Command: pgn-extract --evaluation -otest-evaluation-out.pgn test-evaluation.pgn
349 + Input file containing games.
350 - Input file(s): test-fencomments.pgn
351 - Resulting output should have a comment after every move containing a
352 FEN description of the position after that move.
353 - Expected output: test-fencomments-out.pgn
354 - Command: pgn-extract --fencomments -otest-fencomments-out.pgn test-fencomments.pgn
357 + Input file containing games.
358 - Input file(s): najdorf.pgn, xvars.txt
359 - Resulting output should be only those games which match
360 the result of reaching the opening sequence in vars.txt.
361 The point of each match is marked with the comment { MATCH }
362 - Expected output: test-markmatches-out.pgn
363 - Command: pgn-extract --markmatches MATCH -xxvars.txt -otest-markmatches-out.pgn najdorf.pgn
366 + Input file containing games with moves involving moves that give check
368 - Input file(s): test-nochecks.pgn
369 - Resulting output should contain games with no check indicators after moves.
370 - Expected output: test-nochecks-out.pgn
371 - Command: pgn-extract --nochecks -otest-nochecks-out.pgn test-nochecks.pgn
374 + Input file containing games with move numbers.
375 - Input file(s): test-nomovenumbers.pgn
376 - Resulting output should contain games with no move numbers.
377 - Expected output: test-nomovenumbers-out.pgn
378 - Command: pgn-extract -otest-no-movenumbers-out.pgn --nomovenumbers test-nomovenumbers.pgn
381 + Input file containing games with results.
382 - Input file(s): test-noresults.pgn
383 - Resulting output should contain games with no results.
384 - Expected output: test-noresults-out.pgn
385 - Command: pgn-extract -otest-no-results-out.pgn --noresults test-noresults.pgn
388 + Input file containing games with tag information.
389 - Input file(s): test-notags.pgn
390 - Resulting output should contain games with no tag information.
391 - Expected output: test-notags-out.pgn
392 - Command: pgn-extract -otest-no-tags-out.pgn --notags test-notags.pgn
395 + Input file containing games.
396 - Input file(s): test-plylimit.pgn
397 - Resulting output should contain games whose number of moves (plies) are
398 limited at the specified ply limit.
399 - Expected output: test-plylimit-out.pgn
400 - Command: pgn-extract --plylimit 10 -otest-plylimit-out.pgn test-plylimit.pgn
403 + Input file containing games.
404 - Input file(s): test-stalemate.pgn
405 - Resulting output should contain only those games that end in stalemate.
406 - Expected output: test-stalemate-out.pgn
407 - Command: pgn-extract --stalemate -otest-stalemate-out.pgn test-stalemate.pgn