# Makefile to run a battery of tests of the basic functionality of pgn-extract. # Copyright (C) David J. Barnes, 2013-2020 # # Each test is run and then, where relevant, a comparison is made between # the output files generated in the current directory and the 'oracle' # files that exist in $(OUTPUT). # # Beware of case-insensitive filenames when testing flags that # differ only in letter case. In general, double letters have been # used for output-files generated from using upper-case flag letters. # Customise these for different OSs. SEP=/ RM=rm -f CMP=cmp # Possible Windows settings #SEP=\\ #RM=del #CMP=diff PGN_EXTRACT=..$(SEP)pgn-extract # Use for memory checking if valgrind is installed. #PGN_EXTRACT=valgrind --dsymutil=yes ..$(SEP)pgn-extract #PGN_EXTRACT=valgrind --dsymutil=yes --leak-check=full ..$(SEP)pgn-extract # Location of the file of ECO classifications. ECO_FILE=..$(SEP)eco.pgn # Location of the input files INPUT=infiles # Location of the oracle output files OUTPUT=outfiles # Test everything. all: no-flags-1 no-flags-2 test-7 test-append test-AA test-b test-p \ test-checkfile test-nocomments test-duplicates \ test-noduplicates test-e test-EE test-f test-FF test-h test-l \ test-LL test-checkmate test-n test-NN test-output test-PP test-r \ test-RR test-s test-SS test-t test-TT test-nounique test-v \ test-VV test-linelength test-WW test-x test-ZZ test-y test-z test-hash \ test-evaluation test-fencomments test-markmatches test-nochecks \ test-nomovenumbers test-noresults test-notags test-plylimit \ test-stalemate test-long-line test-plycount test-addhashcode \ test-selectonly test-fifty test-repetition test-promotion \ test-fixresulttags test-fuzzydepth test-setup test-stopafter \ test-skipmatching test-splitvariants test-nobadresults test-allownullmoves \ test-matchplylimit test-nestedcomments test-FENPattern test-dropply \ test-startply test-linenumbers test-seventyfive # BEWARE: This removes all PGN files in the current directory. # The required test PGN files are assumed to be in $(INPUT). clean: -$(RM) *.pgn *og.txt # No flags: # + No input file. # - Input file(s): N$(SEP)A # - Example input: # f3 e5 g4 Qh4 0-1 # - Resulting output should be that the game input on standard input is # formatted as PGN on standard output. # - Expected output: # Contents of fools-mate.pgn on standard output. no-flags-1: echo "test: No input file." $(PGN_EXTRACT) --quiet < $(INPUT)$(SEP)fools-mate.txt # No flags: # + Single input file # - Input file(s): fools-mate.txt # - Resulting output should be the input formatted as PGN on standard output. # - Expected output: Contents of fools-mate.pgn should appear on standard output. no-flags-2: echo "test: No flags." $(PGN_EXTRACT) --quiet $(INPUT)$(SEP)fools-mate.txt # -7 $(SEP) --seven # + Input file with games having tags additional to the seven tag roster. # - Input file(s): test-7.pgn # - Game output should have only the tags of the seven tag roster. # - Expected output: test-7-out.pgn test-7: echo "test-7:" $(PGN_EXTRACT) -7 -otest-7-out.pgn --quiet $(INPUT)$(SEP)test-7.pgn $(CMP) test-7-out.pgn $(OUTPUT)$(SEP)test-7-out.pgn # -a $(SEP) --append # + Input file containing games in any accepted format. # - Input file(s): test-a.txt # - Resulting output should contain two versions of the input game # formatted in PGN. The --output command is run first to create # a new file, then the -a version to append to that file. # - Expected output: test-a-out.pgn test-append: echo "test-append:" $(PGN_EXTRACT) --output test-a-out.pgn --quiet $(INPUT)$(SEP)test-a.txt $(PGN_EXTRACT) -atest-a-out.pgn --quiet $(INPUT)$(SEP)test-a.txt $(CMP) test-a-out.pgn $(OUTPUT)$(SEP)test-a-out.pgn $(PGN_EXTRACT) --output test-a-out.pgn --quiet $(INPUT)$(SEP)test-a.txt $(PGN_EXTRACT) --append test-a-out.pgn --quiet $(INPUT)$(SEP)test-a.txt $(CMP) test-a-out.pgn $(OUTPUT)$(SEP)test-a-out.pgn # -A # + Input file containing games and a file of arguments. # - Input file(s): fischer.pgn, petrosian.pgn, arglist.txt # - Resulting output should be files separating the unique and # duplicated games in the input files. # - Expected output: test-AA-unique.pgn, test-AA-dupes.pgn test-AA: echo "test-AA:" $(PGN_EXTRACT) -C -A$(INPUT)$(SEP)argslist.txt --quiet $(CMP) test-AA-dupes.pgn $(OUTPUT)$(SEP)test-AA-dupes.pgn $(CMP) test-AA-unique.pgn $(OUTPUT)$(SEP)test-AA-unique.pgn # -b # + Input file containing games of different length. # - Input file(s): fischer.pgn # - Resulting output: games whose number of moves is within # the specified bounds. # test-b: test-bl45 test-bu45 test-bu30 # -p # + Input file containing games of different length. # - Input file(s): fischer.pgn # - Resulting output: games whose number of ply is within # the specified bounds. # test-p: test-pl90 test-pu90 test-pu60 # - Expected output: 45 moves or more: test-bl45-out.pgn test-bl45: echo "test-b:" $(PGN_EXTRACT) -bl45 -otest-bl45-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-bl45-out.pgn $(OUTPUT)$(SEP)test-bl45-out.pgn # - Expected output: 45 moves or less: test-bu45-out.pgn test-bu45: echo "test-b:" $(PGN_EXTRACT) -bu45 -otest-bu45-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-bu45-out.pgn $(OUTPUT)$(SEP)test-bu45-out.pgn # - Expected output: exactly 30 moves: test-b30-out.pgn test-bu30: echo "test-b:" $(PGN_EXTRACT) -b30 -otest-b30-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-b30-out.pgn $(OUTPUT)$(SEP)test-b30-out.pgn # - Expected output: 90 moves or more: test-pl90-out.pgn test-pl90: echo "test-p:" $(PGN_EXTRACT) -pl90 -otest-pl90-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-pl90-out.pgn $(OUTPUT)$(SEP)test-pl90-out.pgn # - Expected output: 90 moves or less: test-pu90-out.pgn test-pu90: echo "test-p:" $(PGN_EXTRACT) -pu90 -otest-pu90-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-pu90-out.pgn $(OUTPUT)$(SEP)test-pu90-out.pgn # - Expected output: exactly 60 moves: test-p60-out.pgn test-pu60: echo "test-p:" $(PGN_EXTRACT) -p60 -otest-p60-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-p60-out.pgn $(OUTPUT)$(SEP)test-p60-out.pgn # # -c $(SEP) --checkfile # + Input files containing games. # - Input file(s): fischer.pgn, petrosian.pgn # - Resulting output should contain matched games that do not already occur in # the check file. # - Expected output: test-c-out.pgn test-checkfile: echo "test-checkfile:" $(PGN_EXTRACT) -c$(INPUT)$(SEP)petrosian.pgn -D -TpPetrosian -otest-c-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-c-out.pgn $(OUTPUT)$(SEP)test-c-out.pgn $(PGN_EXTRACT) -c$(INPUT)$(SEP)clist.txt -D -TpPetrosian -otest-c-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-c-out.pgn $(OUTPUT)$(SEP)test-c-out.pgn # -C $(SEP) --nocomments # + Input file containing games with comments # - Input file(s): test-C.pgn # - Resulting output should have all comments removed. # - Expected output: test-CC-out.pgn test-nocomments: echo "test-nocomments:" $(PGN_EXTRACT) -C -otest-CC-out.pgn --quiet $(INPUT)$(SEP)test-C.pgn $(CMP) test-CC-out.pgn $(OUTPUT)$(SEP)test-CC-out.pgn # -d $(SEP) --duplicates # + Input file containing games with duplicates and non-duplicates. # - Input file(s): fischer.pgn, $(INPUT)$(SEP)petrosian.pgn # - Resulting output should be files separating the unique and # duplicated games in the input files. # - Expected output: test-d-unique.pgn, test-d-dupes.pgn test-duplicates: echo "test-duplicates:" $(PGN_EXTRACT) -C -dtest-d-dupes.pgn -otest-d-unique.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(INPUT)$(SEP)petrosian.pgn $(CMP) test-d-dupes.pgn $(OUTPUT)$(SEP)test-d-dupes.pgn $(CMP) test-d-unique.pgn $(OUTPUT)$(SEP)test-d-unique.pgn # -D $(SEP) --noduplicates # + Input file containing games with duplicates and non-duplicates. # - Input file(s): fischer.pgn, $(INPUT)$(SEP)petrosian.pgn # - Resulting output should be a file containing the combined input # with duplicate games removed. # - Expected output: test-DD-unique.pgn test-noduplicates: echo "test-noduplicates:" $(PGN_EXTRACT) -D -otest-DD-unique.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(INPUT)$(SEP)petrosian.pgn $(CMP) test-DD-unique.pgn $(OUTPUT)$(SEP)test-DD-unique.pgn $(PGN_EXTRACT) --noduplicates -otest-DD-unique.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(INPUT)$(SEP)petrosian.pgn $(CMP) test-DD-unique.pgn $(OUTPUT)$(SEP)test-DD-unique.pgn # -e # + Input file containing games without ECO classifications. # - Input file(s): test-e.pgn and eco.pgn in the test folder. # - Resulting output should have ECO classification added to the tags. # - Expected output: test-e-out.pgn test-e: echo "test-e:" $(PGN_EXTRACT) -e$(ECO_FILE) -otest-e-out.pgn --quiet $(INPUT)$(SEP)test-e.pgn $(CMP) test-e-out.pgn $(OUTPUT)$(SEP)test-e-out.pgn # -E # + Input file containing games. # - Input file(s): test-ucE.pgn and eco.pgn if -e flag is used. # - Resulting output should be separate files for each ECO classification # at the level of the initial letter (A-E). # NB: The test removes existing A-E files first because this option appends # to existing files, which breaks the comparison test otherwise. # - Expected output: A.pgn, B.pgn, E.pgn test-EE: echo "test-EE:" -$(RM) [A-E].pgn $(PGN_EXTRACT) -e$(ECO_FILE) -E1 --quiet $(INPUT)$(SEP)test-ucE.pgn $(CMP) A.pgn $(OUTPUT)$(SEP)A.pgn $(CMP) B.pgn $(OUTPUT)$(SEP)B.pgn $(CMP) E.pgn $(OUTPUT)$(SEP)E.pgn # -f # + Input files containing games. # - Input file(s): test-f1.pgn, test-f2.pgn, files.txt # - Resulting output should be the combination of the input files. # - Expected output: test-f-out.pgn test-f: echo "test-f:" $(PGN_EXTRACT) --quiet -f$(INPUT)$(SEP)files.txt -otest-f-out.pgn $(CMP) test-f-out.pgn $(OUTPUT)$(SEP)test-f-out.pgn # -F: # + Input file containing games without a trailing FEN comment. # - Input file(s): test-F.pgn # - Resulting output should have a comment at the end containing # the FEN description of the final position. # - Expected output: test-FF-out.pgn test-FF: echo "test-FF:" $(PGN_EXTRACT) -F -otest-FF-out.pgn --quiet $(INPUT)$(SEP)test-F.pgn $(CMP) test-FF-out.pgn $(OUTPUT)$(SEP)test-FF-out.pgn $(PGN_EXTRACT) -Fdiagram -otest-FF-text-out.pgn --quiet $(INPUT)$(SEP)test-F-text.pgn $(CMP) test-FF-text-out.pgn $(OUTPUT)$(SEP)test-FF-text-out.pgn # # -h $(SEP) -? $(SEP) --help # + No input required. # - Input file(s): N$(SEP)A # - Resulting output should be a description of how to use pgn-extract # - Expected output: N$(SEP)A # Also: # ..$(SEP)pgn-extract -? # ..$(SEP)pgn-extract --help test-h: echo "test-h:" -$(PGN_EXTRACT) -h # -l # + Input file containing games. # - Input file(s): fischer.pgn # - Resulting output: List of games parsed written to log.txt # - Expected output: log.txt test-l: echo "test-l:" $(PGN_EXTRACT) -llog.txt -otest-l-out.pgn $(INPUT)$(SEP)fischer.pgn $(CMP) log.txt $(OUTPUT)$(SEP)log.txt $(CMP) test-l-out.pgn $(OUTPUT)$(SEP)test-l-out.pgn # -L # + Input file containing games. # - Input file(s): test-L1.pgn, test-L2.pgn # - Resulting output should be that log.txt contains the combined # logs from two runs of pgn-extract. # - Expected output: log.txt test-LL: echo "test-LL:" $(PGN_EXTRACT) -lLLog.txt -r $(INPUT)$(SEP)test-L1.pgn $(PGN_EXTRACT) -LLLog.txt -r $(INPUT)$(SEP)test-L2.pgn $(CMP) LLog.txt $(OUTPUT)$(SEP)LLog.txt # -M $(SEP) --checkmate # + Input file containing games. # - Input file(s): test-checkmate.pgn # - Resulting output should contain only those games that end in checkmate. # - Expected output: test-checkmate-out.pgn test-checkmate: echo "test-checkmate:" $(PGN_EXTRACT) --checkmate -otest-checkmate-out.pgn --quiet $(INPUT)$(SEP)test-checkmate.pgn $(CMP) test-checkmate-out.pgn $(OUTPUT)$(SEP)test-checkmate-out.pgn # -n # + Input file containing games. # - Input file(s): petrosian.pgn # - Resulting output should be separate files containing matched # and non-matched games. # - Expected output: test-n-matched.pgn, test-n-unmatched.pgn test-n: echo "test-n:" $(PGN_EXTRACT) -TpFischer -otest-n-matched.pgn -ntest-n-unmatched.pgn --quiet $(INPUT)$(SEP)petrosian.pgn $(CMP) test-n-matched.pgn $(OUTPUT)$(SEP)test-n-matched.pgn $(CMP) test-n-unmatched.pgn $(OUTPUT)$(SEP)test-n-unmatched.pgn # -N $(SEP) --nonags # + Input file containing games with NAGs. # - Input file(s): test-N.pgn # - Resulting output should have all NAGs removed. # - Expected output: test-NN-out.pgn test-NN: echo "test-NN:" $(PGN_EXTRACT) -N -otest-NN-out.pgn --quiet $(INPUT)$(SEP)test-N.pgn $(CMP) test-NN-out.pgn $(OUTPUT)$(SEP)test-NN-out.pgn # Comments after multiple nags. $(PGN_EXTRACT) -otest-nagcomments-out.pgn --quiet $(INPUT)$(SEP)test-nagcomments.pgn # Deleting NAGs with comments after multiple nags. $(PGN_EXTRACT) -N -atest-nagcomments-out.pgn --quiet $(INPUT)$(SEP)test-nagcomments.pgn $(CMP) test-nagcomments-out.pgn $(OUTPUT)$(SEP)test-nagcomments-out.pgn $(CMP) test-nagcomments-out.pgn $(OUTPUT)$(SEP)test-nagcomments-out.pgn # # -o $(SEP) --output # + Input file containing games in any accepted format. # - Input file(s): test-o.txt # - Resulting output should contain the input game formatted in PGN. # - Expected output: test-o-out.pgn test-output: echo "test-output:" $(PGN_EXTRACT) -otest-o-out.pgn --quiet $(INPUT)$(SEP)test-o.txt $(CMP) test-o-out.pgn $(OUTPUT)$(SEP)test-o-out.pgn $(PGN_EXTRACT) --output test-o-out.pgn --quiet $(INPUT)$(SEP)test-o.txt $(CMP) test-o-out.pgn $(OUTPUT)$(SEP)test-o-out.pgn # -P # + Input file containing games with different sequences for the same # opening. # - Input file(s): test-P.pgn, Pvars.txt # - Resulting output should be games whose opening move exactly match # the sequence specified in Pvars.txt # - Expected output: test-PP-out.pgn test-PP: echo "test-PP:" $(PGN_EXTRACT) -P -v$(INPUT)$(SEP)Pvars.txt -otest-PP-out.pgn --quiet $(INPUT)$(SEP)test-P.pgn $(CMP) test-PP-out.pgn $(OUTPUT)$(SEP)test-PP-out.pgn # -r # + Input file containing games in any accepted format. # - Input file(s): test-r.text # - Resulting output should contain tag summary lines for the games # matched and a report of any errors. # - Expected output: test-r-log.txt test-r: echo "test-r:" $(PGN_EXTRACT) -r -ltest-r-log.txt $(INPUT)$(SEP)test-r.txt # $(CMP) test-r-log.txt $(OUTPUT)$(SEP)test-r-log.txt # -R # + Input file containing games. # - Input file(s): test-R.pgn, roster.txt # - Resulting output should contain games with their tag roster in # the order specified in roster.txt # - Expected output: test-R-out.pgn test-RR: echo "test-RR:" $(PGN_EXTRACT) -R$(INPUT)$(SEP)roster.txt --output test-RR-out.pgn --quiet $(INPUT)$(SEP)test-R.pgn $(CMP) test-RR-out.pgn $(OUTPUT)$(SEP)test-RR-out.pgn # -s # + Input file containing games. # - Input file(s): test-s.pgn # - Resulting output should be silent, with games written to the output file. # - Expected output: test-s-out.pgn test-s: echo "test-s:" $(PGN_EXTRACT) -s -o test-s-out.pgn $(INPUT)$(SEP)test-s.pgn $(CMP) test-s-out.pgn $(OUTPUT)$(SEP)test-s-out.pgn # -S # + Input file containing games whose players' names have slight # sound variations from anglesized versions. # - Input file(s): test-ucS.pgn # - Resulting output should be games that match by ignoring slight # soundex differences. # - Expected output: test-SS-out.pgn test-SS: echo "test-SS:" $(PGN_EXTRACT) -S -TpPetrosian -otest-SS-out.pgn --quiet $(INPUT)$(SEP)test-ucS.pgn $(CMP) test-SS-out.pgn $(OUTPUT)$(SEP)test-SS-out.pgn # -t # + Input file containing games and a file of tag criteria. # - Input file(s): test-t.pgn, taglist.txt # - Resulting output should be only those games whose tags match # all of the criteria. # - Expected output: test-t-out.pgn test-t: echo "test-t:" $(PGN_EXTRACT) -t$(INPUT)$(SEP)taglist.txt -otest-t-out.pgn --quiet $(INPUT)$(SEP)test-t.pgn $(CMP) test-t-out.pgn $(OUTPUT)$(SEP)test-t-out.pgn $(PGN_EXTRACT) -t$(INPUT)$(SEP)test-tFEN.txt -otest-tFEN-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-tFEN-out.pgn $(OUTPUT)$(SEP)test-tFEN-out.pgn # -T # + Input file containing games with tag information. # - Input file(s): fischer.pgn, test-Ta.pgn (and eco.pgn for -Te test.) # - Resulting output should contain only those games whose tag information # matches that specified. # - Expected output: test-Ta-out.pgn, test-Tb-out.pgn, test-Td-out.pgn, # test-Tdd-out.pgn test-Te-out.pgn, test-Tp-out.pgn, # test-Tw-out.pgn test-TT: echo "test-TT:" $(PGN_EXTRACT) -Td1970 -otest-TTd-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTd-out.pgn $(OUTPUT)$(SEP)test-TTd-out.pgn $(PGN_EXTRACT) -Td1960 -Td1962 -otest-TTdd-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTdd-out.pgn $(OUTPUT)$(SEP)test-TTdd-out.pgn $(PGN_EXTRACT) -TbPetrosian -otest-TTb-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTb-out.pgn $(OUTPUT)$(SEP)test-TTb-out.pgn $(PGN_EXTRACT) -e$(ECO_FILE) -TeB14 -otest-Te-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(PGN_EXTRACT) -TpPetrosian -otest-TTp-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTp-out.pgn $(OUTPUT)$(SEP)test-TTp-out.pgn $(PGN_EXTRACT) -Tr0-1 -otest-TTr-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTr-out.pgn $(OUTPUT)$(SEP)test-TTr-out.pgn $(PGN_EXTRACT) -TwFischer -otest-TTw-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-TTw-out.pgn $(OUTPUT)$(SEP)test-TTw-out.pgn $(PGN_EXTRACT) -TaBarnes -otest-TTa-out.pgn --quiet $(INPUT)$(SEP)test-Ta.pgn $(CMP) test-TTa-out.pgn $(OUTPUT)$(SEP)test-TTa-out.pgn # -U $(SEP) --nounique # + Input file containing games with duplicates and non-duplicates. # - Input file(s): fischer.pgn, petrosian.pgn # - Resulting output should be a file containing just the duplicate games. # - Expected output: test-U-unique.pgn test-nounique: echo "test-nounique:" $(PGN_EXTRACT) -U -otest-UU-unique.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(INPUT)$(SEP)petrosian.pgn $(CMP) test-UU-unique.pgn $(OUTPUT)$(SEP)test-UU-unique.pgn $(PGN_EXTRACT) --nounique -otest-UU-unique.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(INPUT)$(SEP)petrosian.pgn $(CMP) test-UU-unique.pgn $(OUTPUT)$(SEP)test-UU-unique.pgn # -v # + Input file containing games. # - Input file(s): najdorf.pgn, vvars.txt # - Resulting output should be only those games whose opening moves # textually match (in any order) the moves in vars.txt. # - Expected output: test-v-out.pgn test-v: echo "test-v:" $(PGN_EXTRACT) -v$(INPUT)$(SEP)vvars.txt -otest-v-out.pgn --quiet $(INPUT)$(SEP)najdorf.pgn $(CMP) test-v-out.pgn $(OUTPUT)$(SEP)test-v-out.pgn # -V # + Input file containing games with variations # - Input file(s): test-V.pgn # - Resulting output should have all variations removed. # - Expected output: test-V-out.pgn test-VV: echo "test-VV:" $(PGN_EXTRACT) -V -otest-VV-out.pgn --quiet $(INPUT)$(SEP)test-V.pgn $(CMP) test-VV-out.pgn $(OUTPUT)$(SEP)test-VV-out.pgn # -w $(SEP) --linelength # + Input file containing games. # - Input file(s): test-w.pgn # - Resulting output Games formatted up to the specified line length. # The default is 75. # - Expected output: test-w60-out.pgn, test-w75-out.pgn, test-w1000-out.pgn test-linelength: echo "test-linelength:" $(PGN_EXTRACT) -w60 -otest-w60-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w60-out.pgn $(OUTPUT)$(SEP)test-w60-out.pgn $(PGN_EXTRACT) -w75 -otest-w75-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w75-out.pgn $(OUTPUT)$(SEP)test-w75-out.pgn $(PGN_EXTRACT) -w1000 -otest-w1000-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w1000-out.pgn $(OUTPUT)$(SEP)test-w1000-out.pgn $(PGN_EXTRACT) --linelength 60 -otest-w60-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w60-out.pgn $(OUTPUT)$(SEP)test-w60-out.pgn $(PGN_EXTRACT) --linelength 75 -otest-w75-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w75-out.pgn $(OUTPUT)$(SEP)test-w75-out.pgn $(PGN_EXTRACT) --linelength 1000 -otest-w1000-out.pgn --quiet $(INPUT)$(SEP)test-w.pgn $(CMP) test-w1000-out.pgn $(OUTPUT)$(SEP)test-w1000-out.pgn # -W # + Input file containing games. # - Input file(s): test-ucW.pgn # - Resulting output should be games formatted in the specified notation: # halg (hyphenated long algebraic), lalg (non-hyphenated long algebraic), # elalg (enhanced long algebraic), xlalg (enhanced with capture info), # uci (UCI-compatible output), # and alternative piece letters. # - Expected output: test-WWhalg-out.pgn, test-WWlalg-out.pgn, # test-WWelalg-out.pgn, test-WWdeutsch-out.pgn, # test-WWuci-out.pgn test-WW: echo "test-WW:" $(PGN_EXTRACT) -Whalg -otest-WWhalg-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWhalg-out.pgn $(OUTPUT)$(SEP)test-WWhalg-out.pgn $(PGN_EXTRACT) -Wlalg -otest-WWlalg-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWlalg-out.pgn $(OUTPUT)$(SEP)test-WWlalg-out.pgn $(PGN_EXTRACT) -Welalg -otest-WWelalg-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWelalg-out.pgn $(OUTPUT)$(SEP)test-WWelalg-out.pgn $(PGN_EXTRACT) -Wxlalg -otest-WWxlalg-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWxlalg-out.pgn $(OUTPUT)$(SEP)test-WWxlalg-out.pgn $(PGN_EXTRACT) -WsanBSLTDK -otest-WWdeutsch-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWdeutsch-out.pgn $(OUTPUT)$(SEP)test-WWdeutsch-out.pgn $(PGN_EXTRACT) -Wuci -otest-WWuci-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWuci-out.pgn $(OUTPUT)$(SEP)test-WWuci-out.pgn $(PGN_EXTRACT) -Wepd -otest-WWepd-out.pgn --quiet $(INPUT)$(SEP)test-ucW.pgn $(CMP) test-WWepd-out.pgn $(OUTPUT)$(SEP)test-WWepd-out.pgn # -x # + Input file containing games. # - Input file(s): najdorf.pgn, xvars.txt # - Resulting output should be only those games which match # the result of reaching the opening sequence in vars.txt. # - Expected output: test-x-out.pgn test-x: echo "test-x:" $(PGN_EXTRACT) -x$(INPUT)$(SEP)xvars.txt -otest-x-out.pgn --quiet $(INPUT)$(SEP)najdorf.pgn $(CMP) test-x-out.pgn $(OUTPUT)$(SEP)test-x-out.pgn $(PGN_EXTRACT) -x$(INPUT)$(SEP)xvars.txt -otest-x-out.pgn -ntest-xn-out.pgn --quiet $(INPUT)$(SEP)najdorf.pgn $(CMP) test-xn-out.pgn $(OUTPUT)$(SEP)test-xn-out.pgn # -y # + Input file containing games. # - Input file(s): fischer.pgn, zmatch.txt # - Resulting output should be games whose material balance matches that # specified in ymatch.txt # - Expected output: test-y-out.pgn test-y: echo "test-y:" $(PGN_EXTRACT) -y$(INPUT)$(SEP)ymatch.txt --markmatches MATCH -otest-y-out.pgn --quiet $(INPUT)$(SEP)fischer.pgn $(CMP) test-y-out.pgn $(OUTPUT)$(SEP)test-y-out.pgn $(PGN_EXTRACT) --materialy "q*r*p*b2n2< q=r=p=b2