diff options
author | emkael <emkael@tlen.pl> | 2020-10-20 01:59:57 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2020-10-20 01:59:57 +0200 |
commit | 006822e6ad0f8ab0ddf45fd53d053e493eaee505 (patch) | |
tree | 755570685120c245951f5fa61b14f3c9227d07ce | |
parent | be528a2fb815d30517c933d680b1a38c13b353e1 (diff) |
Conversion tests
-rw-r--r-- | test/test-jfr.pbn | 128 | ||||
-rw-r--r-- | test/test.ber | 1 | ||||
-rw-r--r-- | test/test.bhg | 17 | ||||
-rw-r--r-- | test/test.bri | bin | 0 -> 2048 bytes | |||
-rw-r--r-- | test/test.cds | 3 | ||||
-rw-r--r-- | test/test.csv | 16 | ||||
-rw-r--r-- | test/test.dge | bin | 0 -> 2048 bytes | |||
-rw-r--r-- | test/test.dlm | 208 | ||||
-rw-r--r-- | test/test.dup | bin | 0 -> 2496 bytes | |||
-rw-r--r-- | test/test.lin | 35 | ||||
-rw-r--r-- | test/test.pbn | 480 | ||||
-rw-r--r-- | test/test.rzd | bin | 0 -> 221 bytes | |||
-rw-r--r-- | tests.py | 26 |
13 files changed, 914 insertions, 0 deletions
diff --git a/test/test-jfr.pbn b/test/test-jfr.pbn new file mode 100644 index 0000000..98f9146 --- /dev/null +++ b/test/test-jfr.pbn @@ -0,0 +1,128 @@ +[Event ""]
+[Board "1"]
+[Dealer "N"]
+[Vulnerable "None"]
+[Deal "N:65.A53.JT7.AK762 AK87.QT4.AK98.95 JT9.982.Q532.Q83 Q432.KJ76.64.JT4"]
+[Ability "N:63456 E:7A986 S:63456 W:7A986"]
+[Minimax "4SW-420"]
+
+[Event ""]
+[Board "2"]
+[Dealer "E"]
+[Vulnerable "NS"]
+[Deal "N:AQ63.J7.Q42.AKJ7 T942.T5.KT6.9643 J85.4.AJ8753.Q82 K7.AKQ98632.9.T5"]
+[Ability "N:5A5CC E:02800 S:5A5CC W:02800"]
+[Minimax "6HDE800"]
+
+[Event ""]
+[Board "3"]
+[Dealer "S"]
+[Vulnerable "EW"]
+[Deal "N:QT5.KQ9863.T7.T8 K764.A7.Q543.AQ9 AJ92.J42.KJ96.72 83.T5.A82.KJ6543"]
+[Ability "N:58965 E:85468 S:58965 W:85468"]
+[Minimax "3HS140"]
+
+[Event ""]
+[Board "4"]
+[Dealer "W"]
+[Vulnerable "All"]
+[Deal "N:Q942.J96.Q94.K73 J6.AK42.AJT83.T2 T53.753.K762.J64 AK87.QT8.5.AQ985"]
+[Ability "N:22132 E:BACAB S:22132 W:BBCAB"]
+[Minimax "6HW-1430"]
+
+[Event ""]
+[Board "5"]
+[Dealer "N"]
+[Vulnerable "NS"]
+[Deal "N:A2.KT954.K9.JT74 KQ64..Q73.AQ8653 53.AQ8732.JT85.2 JT987.J6.A642.K9"]
+[Ability "N:71A43 E:5B28A S:71A43 W:5B28A"]
+[Minimax "5SW-450"]
+
+[Event ""]
+[Board "6"]
+[Dealer "E"]
+[Vulnerable "EW"]
+[Deal "N:KJ52.83.AJ5432.8 T4.QJT6542.8.763 AQ.AK9.QT.QJT542 98763.7.K976.AK9"]
+[Ability "N:B98B9 E:23523 S:B98B9 W:23523"]
+[Minimax "3NS460"]
+
+[Event ""]
+[Board "7"]
+[Dealer "S"]
+[Vulnerable "All"]
+[Deal "N:JT32.K95.AJ2.T64 K965.7.T654.AKQ3 84.AQJ642.98.987 AQ7.T83.KQ73.J52"]
+[Ability "N:64733 E:696A9 S:64733 W:696A9"]
+[Minimax "1SW-140"]
+
+[Event ""]
+[Board "8"]
+[Dealer "W"]
+[Vulnerable "None"]
+[Deal "N:T865..AJ432.QJ75 43.AT74.QT7.A642 AKJ7.9852.K965.3 Q92.KQJ63.8.KT98"]
+[Ability "N:594A5 E:84936 S:594A5 W:84937"]
+[Minimax "4HDE100"]
+
+[Event ""]
+[Board "9"]
+[Dealer "N"]
+[Vulnerable "EW"]
+[Deal "N:Q93.T84.K987.K95 K4.632.QJ52.JT86 AJT76.AQ5.T.A742 852.KJ97.A643.Q3"]
+[Ability "N:9A879 E:43564 S:9A879 W:43564"]
+[Minimax "4SS420"]
+
+[Event ""]
+[Board "10"]
+[Dealer "E"]
+[Vulnerable "All"]
+[Deal "N:62.QJ82.A87.J985 QJT.74.JT9643.T3 K984.AT953.K.AK6 A753.K6.Q52.Q742"]
+[Ability "N:87A58 E:45374 S:87A59 W:45374"]
+[Minimax "4HS620"]
+
+[Event ""]
+[Board "11"]
+[Dealer "S"]
+[Vulnerable "None"]
+[Deal "N:AQJ6.QT9432.T.62 8.AJ5.J9762.AK94 KT972.76.K5.QJT7 543.K8.AQ843.853"]
+[Ability "N:38713 E:856C9 S:38713 W:856C9"]
+[Minimax "6SDS-800"]
+
+[Event ""]
+[Board "12"]
+[Dealer "W"]
+[Vulnerable "NS"]
+[Deal "N:KT9532.J73.QJ2.6 Q876.T.AK543.J43 A4.AK952.T97.975 J.Q864.86.AKQT82"]
+[Ability "N:57733 E:8559A S:57733 W:8559A"]
+[Minimax "2CW-130"]
+
+[Event ""]
+[Board "13"]
+[Dealer "N"]
+[Vulnerable "All"]
+[Deal "N:54.7654.AK9.J652 KQJ98.AQ8.43.743 AT2.J9.T876.AKQ8 763.KT32.QJ52.T9"]
+[Ability "N:85689 E:58754 S:85689 W:58754"]
+[Minimax "2NS120"]
+
+[Event ""]
+[Board "14"]
+[Dealer "E"]
+[Vulnerable "None"]
+[Deal "N:K93.Q543.AJ852.T 642.K72.Q93.8753 AQ.JT6.KT6.AKQ96 JT875.A98.74.J42"]
+[Ability "N:B9BBB E:14201 S:B9BBB W:04200"]
+[Minimax "3NS460"]
+
+[Event ""]
+[Board "15"]
+[Dealer "S"]
+[Vulnerable "NS"]
+[Deal "N:AQJ.QT4.AQ53.743 7542.A75.4.QJT92 KT83.3.K9872.865 96.KJ9862.JT6.AK"]
+[Ability "N:68296 E:44937 S:68296 W:44937"]
+[Minimax "3HW-140"]
+
+[Event ""]
+[Board "16"]
+[Dealer "W"]
+[Vulnerable "EW"]
+[Deal "N:Q3.Q732.87.JT643 K95.AKJ854.5.K52 JT4.T96.A632.A98 A8762..KQJT94.Q7"]
+[Ability "N:32325 E:AA9B8 S:32325 W:AA9B8"]
+[Minimax "3NW-630"]
+
diff --git a/test/test.ber b/test/test.ber new file mode 100644 index 0000000..93223f7 --- /dev/null +++ b/test/test.ber @@ -0,0 +1 @@ +2243332211444142423344121322311221434331134423112431141322341321244412441423443213243323131113142312422332131342212432113411214313432313413222424241213444434412314423131224141431323223122123341234143244134312122444442323131341133411334123313243424242114212212331312444412413322231422212143134244111144333412233234241123422311313341423134314412334222412224133314124334314131122424442332432431321234233111241144412123232133143342143434141423122412231114244231422123213434322233414341341133124323113422211242243341211431424131133231444324121143321114342124223442223332431424131241122213113341234143413221133434222144424343132243222322441143242343211114411443133342243331443211221313441442421242133442311121321321431421333413223242413113432422322414144242134131443334121344222231331124213324442314221233213221134444411324333241133412112
\ No newline at end of file diff --git a/test/test.bhg b/test/test.bhg new file mode 100644 index 0000000..6f44338 --- /dev/null +++ b/test/test.bhg @@ -0,0 +1,17 @@ +
+IJNWYdehnouvzABGHPRXabfgswDEFSTZcjlmptyCKLMOQUVikqrx
+EFKMRWbeisvxyDGJXadghjlptzBHNOPSTVYZfrwACILQUckmnoqu
+ADFMQXZbdfiuzGLRWagmoqvwxyCEJOPSTVYehrtBHIKNUcjklnps
+ABGHPRTjnpstwCFKMQSVcfkouyDINOXZadeglrzEJLUWYbhimqvx
+AMORSWXbfqruxBCIKchlnptvwyJLNPTUYZdegjzDEFGHQVaikmos
+EKPQRVWXZguvyACNOScepqrwxzFGHILUbfhinosBDJMTYadjklmt
+GKNPQVXZfgstuACHRTYbchlqwzDELMOSWadmrvxBFIJUeijknopy
+CFMOPQVYgorstEGIJadklmpquwKLNRUXcehnvxzABDHSTWZbfijy
+CFLRTXbfghoswBKVYZcdjmqrtvADEHINPWenuxzGJMOQSUaiklpy
+CDEUXdefiklryBFGKNRSWYbnovAHJLOVcjmpuxzIMPQTZaghqstw
+BEFHMUVbjpqruJKLOTacgkltwyACDIPRSXYZevzGNQWdfhimnosx
+DPTVXginoprtzBEFJLMQUYcdmvCGHIRabjklqxyAKNOSWZefhsuw
+JKUVWXabfqvwzBCDFGNPTkluxyAEMQSeghinoptHILORYZcdjmrs
+IKMOUZcfltuwyACQRVbeinopsvDEGHJNSThkqxzBFLPWXYadgjmr
+BEGLYbfghmtvwFIOQSTVZdeinoACDPRXacjluxyHJKMNUWkpqrsz
+AGHIMbcdefkpuCLPUYZghqrvxyBFJNOQTWXjowzDEKRSVailmnst
diff --git a/test/test.bri b/test/test.bri Binary files differnew file mode 100644 index 0000000..a95df52 --- /dev/null +++ b/test/test.bri diff --git a/test/test.cds b/test/test.cds new file mode 100644 index 0000000..1e67d5b --- /dev/null +++ b/test/test.cds @@ -0,0 +1,3 @@ +/A^ =M GݨJNZEH(-DT=gnr
>9ޑspg0"gg62tI#Bt h<pN}6 xE9`+ +7ϐ$K1:PbSkڀy,xl{Zt
燣̴QZ +o4=K"ZdVBϭ/P'=]
\ No newline at end of file diff --git a/test/test.csv b/test/test.csv new file mode 100644 index 0000000..00c869d --- /dev/null +++ b/test/test.csv @@ -0,0 +1,16 @@ +"65","A53","JT7","AK762","AK87","QT4","AK98","95","JT9","982","Q532","Q83","Q432","KJ76","64","JT4","1","N/-"
+"AQ63","J7","Q42","AKJ7","T942","T5","KT6","9643","J85","4","AJ8753","Q82","K7","AKQ98632","9","T5","2","E/NS"
+"QT5","KQ9863","T7","T8","K764","A7","Q543","AQ9","AJ92","J42","KJ96","72","83","T5","A82","KJ6543","3","S/EW"
+"Q942","J96","Q94","K73","J6","AK42","AJT83","T2","T53","753","K762","J64","AK87","QT8","5","AQ985","4","W/All"
+"A2","KT954","K9","JT74","KQ64","","Q73","AQ8653","53","AQ8732","JT85","2","JT987","J6","A642","K9","5","N/NS"
+"KJ52","83","AJ5432","8","T4","QJT6542","8","763","AQ","AK9","QT","QJT542","98763","7","K976","AK9","6","E/EW"
+"JT32","K95","AJ2","T64","K965","7","T654","AKQ3","84","AQJ642","98","987","AQ7","T83","KQ73","J52","7","S/All"
+"T865","","AJ432","QJ75","43","AT74","QT7","A642","AKJ7","9852","K965","3","Q92","KQJ63","8","KT98","8","W/-"
+"Q93","T84","K987","K95","K4","632","QJ52","JT86","AJT76","AQ5","T","A742","852","KJ97","A643","Q3","9","N/EW"
+"62","QJ82","A87","J985","QJT","74","JT9643","T3","K984","AT953","K","AK6","A753","K6","Q52","Q742","10","E/All"
+"AQJ6","QT9432","T","62","8","AJ5","J9762","AK94","KT972","76","K5","QJT7","543","K8","AQ843","853","11","S/-"
+"KT9532","J73","QJ2","6","Q876","T","AK543","J43","A4","AK952","T97","975","J","Q864","86","AKQT82","12","W/NS"
+"54","7654","AK9","J652","KQJ98","AQ8","43","743","AT2","J9","T876","AKQ8","763","KT32","QJ52","T9","13","N/All"
+"K93","Q543","AJ852","T","642","K72","Q93","8753","AQ","JT6","KT6","AKQ96","JT875","A98","74","J42","14","E/-"
+"AQJ","QT4","AQ53","743","7542","A75","4","QJT92","KT83","3","K9872","865","96","KJ9862","JT6","AK","15","S/NS"
+"Q3","Q732","87","JT643","K95","AKJ854","5","K52","JT4","T96","A632","A98","A8762","","KQJT94","Q7","16","W/EW"
diff --git a/test/test.dge b/test/test.dge Binary files differnew file mode 100644 index 0000000..157adda --- /dev/null +++ b/test/test.dge diff --git a/test/test.dlm b/test/test.dlm new file mode 100644 index 0000000..0c3ca28 --- /dev/null +++ b/test/test.dlm @@ -0,0 +1,208 @@ +[Document]
+Headline=Generated by deal-converter.py
+Status=Show
+Duplicates=1
+From board=1
+To board=16
+Next board to duplimate=0
+PrintOuts=0
+Crypto key=0
+Checksum=17
+Duplicates 01=0
+Board 01=fokfapmnnkpbcfibeooicpgahi022
+Duplicates 02=0
+Board 02=dcflcehpbpdgpjchkgcacdgbng020
+Duplicates 03=0
+Board 03=jccnehjalaeocogcmjfnnmelpo020
+Duplicates 04=0
+Board 04=pbipgcbhddijjgbeglbldjpcob029
+Duplicates 05=0
+Board 05=bhppggccmclakmgijonnnanbeg000
+Duplicates 06=0
+Board 06=iihpmhcjfinfbdilhmadokmfkg021
+Duplicates 07=0
+Board 07=nmblficcldgcodmglfhbfmkimh004
+Duplicates 08=0
+Board 08=kodcafnpnkhjocegnkabmdpbbj014
+Duplicates 09=0
+Board 09=jcioleoommnifmfianpgdfbjco018
+Duplicates 10=0
+Board 10=ofgldlcmcihjicnfahfolbaodh008
+Duplicates 11=0
+Board 11=cakgdpjmedkeaonbngpfgkhinm010
+Duplicates 12=0
+Board 12=ihafeiclbldlcfakonfdphlijh028
+Duplicates 13=0
+Board 13=jfjhmdjnljaapapiklfokdoebe012
+Duplicates 14=0
+Board 14=ilmphehekpgabcejdinckmjghh014
+Duplicates 15=0
+Board 15=caljngfmmphelcdokmelnfgcib021
+Duplicates 16=0
+Board 16=ncjpninegjcfalppajokhakmeb009
+Duplicates 17=0
+Board 17=aaaaaabffffffkkkkkklpppppp031
+Duplicates 18=0
+Board 18=aaaaaabffffffkkkkkklpppppp028
+Duplicates 19=0
+Board 19=aaaaaabffffffkkkkkklpppppp029
+Duplicates 20=0
+Board 20=aaaaaabffffffkkkkkklpppppp026
+Duplicates 21=0
+Board 21=aaaaaabffffffkkkkkklpppppp027
+Duplicates 22=0
+Board 22=aaaaaabffffffkkkkkklpppppp024
+Duplicates 23=0
+Board 23=aaaaaabffffffkkkkkklpppppp025
+Duplicates 24=0
+Board 24=aaaaaabffffffkkkkkklpppppp022
+Duplicates 25=0
+Board 25=aaaaaabffffffkkkkkklpppppp023
+Duplicates 26=0
+Board 26=aaaaaabffffffkkkkkklpppppp020
+Duplicates 27=0
+Board 27=aaaaaabffffffkkkkkklpppppp021
+Duplicates 28=0
+Board 28=aaaaaabffffffkkkkkklpppppp018
+Duplicates 29=0
+Board 29=aaaaaabffffffkkkkkklpppppp019
+Duplicates 30=0
+Board 30=aaaaaabffffffkkkkkklpppppp016
+Duplicates 31=0
+Board 31=aaaaaabffffffkkkkkklpppppp017
+Duplicates 32=0
+Board 32=aaaaaabffffffkkkkkklpppppp046
+Duplicates 33=0
+Board 33=aaaaaabffffffkkkkkklpppppp047
+Duplicates 34=0
+Board 34=aaaaaabffffffkkkkkklpppppp044
+Duplicates 35=0
+Board 35=aaaaaabffffffkkkkkklpppppp045
+Duplicates 36=0
+Board 36=aaaaaabffffffkkkkkklpppppp042
+Duplicates 37=0
+Board 37=aaaaaabffffffkkkkkklpppppp043
+Duplicates 38=0
+Board 38=aaaaaabffffffkkkkkklpppppp040
+Duplicates 39=0
+Board 39=aaaaaabffffffkkkkkklpppppp041
+Duplicates 40=0
+Board 40=aaaaaabffffffkkkkkklpppppp038
+Duplicates 41=0
+Board 41=aaaaaabffffffkkkkkklpppppp039
+Duplicates 42=0
+Board 42=aaaaaabffffffkkkkkklpppppp036
+Duplicates 43=0
+Board 43=aaaaaabffffffkkkkkklpppppp037
+Duplicates 44=0
+Board 44=aaaaaabffffffkkkkkklpppppp034
+Duplicates 45=0
+Board 45=aaaaaabffffffkkkkkklpppppp035
+Duplicates 46=0
+Board 46=aaaaaabffffffkkkkkklpppppp032
+Duplicates 47=0
+Board 47=aaaaaabffffffkkkkkklpppppp033
+Duplicates 48=0
+Board 48=aaaaaabffffffkkkkkklpppppp062
+Duplicates 49=0
+Board 49=aaaaaabffffffkkkkkklpppppp063
+Duplicates 50=0
+Board 50=aaaaaabffffffkkkkkklpppppp060
+Duplicates 51=0
+Board 51=aaaaaabffffffkkkkkklpppppp061
+Duplicates 52=0
+Board 52=aaaaaabffffffkkkkkklpppppp058
+Duplicates 53=0
+Board 53=aaaaaabffffffkkkkkklpppppp059
+Duplicates 54=0
+Board 54=aaaaaabffffffkkkkkklpppppp056
+Duplicates 55=0
+Board 55=aaaaaabffffffkkkkkklpppppp057
+Duplicates 56=0
+Board 56=aaaaaabffffffkkkkkklpppppp054
+Duplicates 57=0
+Board 57=aaaaaabffffffkkkkkklpppppp055
+Duplicates 58=0
+Board 58=aaaaaabffffffkkkkkklpppppp052
+Duplicates 59=0
+Board 59=aaaaaabffffffkkkkkklpppppp053
+Duplicates 60=0
+Board 60=aaaaaabffffffkkkkkklpppppp050
+Duplicates 61=0
+Board 61=aaaaaabffffffkkkkkklpppppp051
+Duplicates 62=0
+Board 62=aaaaaabffffffkkkkkklpppppp048
+Duplicates 63=0
+Board 63=aaaaaabffffffkkkkkklpppppp049
+Duplicates 64=0
+Board 64=aaaaaabffffffkkkkkklpppppp078
+Duplicates 65=0
+Board 65=aaaaaabffffffkkkkkklpppppp079
+Duplicates 66=0
+Board 66=aaaaaabffffffkkkkkklpppppp076
+Duplicates 67=0
+Board 67=aaaaaabffffffkkkkkklpppppp077
+Duplicates 68=0
+Board 68=aaaaaabffffffkkkkkklpppppp074
+Duplicates 69=0
+Board 69=aaaaaabffffffkkkkkklpppppp075
+Duplicates 70=0
+Board 70=aaaaaabffffffkkkkkklpppppp072
+Duplicates 71=0
+Board 71=aaaaaabffffffkkkkkklpppppp073
+Duplicates 72=0
+Board 72=aaaaaabffffffkkkkkklpppppp070
+Duplicates 73=0
+Board 73=aaaaaabffffffkkkkkklpppppp071
+Duplicates 74=0
+Board 74=aaaaaabffffffkkkkkklpppppp068
+Duplicates 75=0
+Board 75=aaaaaabffffffkkkkkklpppppp069
+Duplicates 76=0
+Board 76=aaaaaabffffffkkkkkklpppppp066
+Duplicates 77=0
+Board 77=aaaaaabffffffkkkkkklpppppp067
+Duplicates 78=0
+Board 78=aaaaaabffffffkkkkkklpppppp064
+Duplicates 79=0
+Board 79=aaaaaabffffffkkkkkklpppppp065
+Duplicates 80=0
+Board 80=aaaaaabffffffkkkkkklpppppp094
+Duplicates 81=0
+Board 81=aaaaaabffffffkkkkkklpppppp095
+Duplicates 82=0
+Board 82=aaaaaabffffffkkkkkklpppppp092
+Duplicates 83=0
+Board 83=aaaaaabffffffkkkkkklpppppp093
+Duplicates 84=0
+Board 84=aaaaaabffffffkkkkkklpppppp090
+Duplicates 85=0
+Board 85=aaaaaabffffffkkkkkklpppppp091
+Duplicates 86=0
+Board 86=aaaaaabffffffkkkkkklpppppp088
+Duplicates 87=0
+Board 87=aaaaaabffffffkkkkkklpppppp089
+Duplicates 88=0
+Board 88=aaaaaabffffffkkkkkklpppppp086
+Duplicates 89=0
+Board 89=aaaaaabffffffkkkkkklpppppp087
+Duplicates 90=0
+Board 90=aaaaaabffffffkkkkkklpppppp084
+Duplicates 91=0
+Board 91=aaaaaabffffffkkkkkklpppppp085
+Duplicates 92=0
+Board 92=aaaaaabffffffkkkkkklpppppp082
+Duplicates 93=0
+Board 93=aaaaaabffffffkkkkkklpppppp083
+Duplicates 94=0
+Board 94=aaaaaabffffffkkkkkklpppppp080
+Duplicates 95=0
+Board 95=aaaaaabffffffkkkkkklpppppp081
+Duplicates 96=0
+Board 96=aaaaaabffffffkkkkkklpppppp110
+Duplicates 97=0
+Board 97=aaaaaabffffffkkkkkklpppppp111
+Duplicates 98=0
+Board 98=aaaaaabffffffkkkkkklpppppp108
+Duplicates 99=0
+Board 99=aaaaaabffffffkkkkkklpppppp109
diff --git a/test/test.dup b/test/test.dup Binary files differnew file mode 100644 index 0000000..61f491c --- /dev/null +++ b/test/test.dup diff --git a/test/test.lin b/test/test.lin new file mode 100644 index 0000000..b3288b4 --- /dev/null +++ b/test/test.lin @@ -0,0 +1,35 @@ +vg|,SEGMENT 1,I,1,16,HOME,0,AWAY,0|
+rs|,,,,,,,,,,,|
+pn|,,,,,,,|pg||
+qx|o1|pn|,,,,,,,|md|3SJT9H982DQ532CQ83,SQ432HKJ76D64CJT4,S65HA53DJT7CAK762,SAK87HQT4DAK98C95|sv|0|pg||
+qx|c1|pn|,,,,,,,|md|3SJT9H982DQ532CQ83,SQ432HKJ76D64CJT4,S65HA53DJT7CAK762,SAK87HQT4DAK98C95|sv|0|pg||
+qx|o2|pn|,,,,,,,|md|4SJ85H4DAJ8753CQ82,SK7HAKQ98632D9CT5,SAQ63HJ7DQ42CAKJ7,ST942HT5DKT6C9643|sv|n|pg||
+qx|c2|pn|,,,,,,,|md|4SJ85H4DAJ8753CQ82,SK7HAKQ98632D9CT5,SAQ63HJ7DQ42CAKJ7,ST942HT5DKT6C9643|sv|n|pg||
+qx|o3|pn|,,,,,,,|md|1SAJ92HJ42DKJ96C72,S83HT5DA82CKJ6543,SQT5HKQ9863DT7CT8,SK764HA7DQ543CAQ9|sv|e|pg||
+qx|c3|pn|,,,,,,,|md|1SAJ92HJ42DKJ96C72,S83HT5DA82CKJ6543,SQT5HKQ9863DT7CT8,SK764HA7DQ543CAQ9|sv|e|pg||
+qx|o4|pn|,,,,,,,|md|2ST53H753DK762CJ64,SAK87HQT8D5CAQ985,SQ942HJ96DQ94CK73,SJ6HAK42DAJT83CT2|sv|b|pg||
+qx|c4|pn|,,,,,,,|md|2ST53H753DK762CJ64,SAK87HQT8D5CAQ985,SQ942HJ96DQ94CK73,SJ6HAK42DAJT83CT2|sv|b|pg||
+qx|o5|pn|,,,,,,,|md|3S53HAQ8732DJT85C2,SJT987HJ6DA642CK9,SA2HKT954DK9CJT74,SKQ64HDQ73CAQ8653|sv|n|pg||
+qx|c5|pn|,,,,,,,|md|3S53HAQ8732DJT85C2,SJT987HJ6DA642CK9,SA2HKT954DK9CJT74,SKQ64HDQ73CAQ8653|sv|n|pg||
+qx|o6|pn|,,,,,,,|md|4SAQHAK9DQTCQJT542,S98763H7DK976CAK9,SKJ52H83DAJ5432C8,ST4HQJT6542D8C763|sv|e|pg||
+qx|c6|pn|,,,,,,,|md|4SAQHAK9DQTCQJT542,S98763H7DK976CAK9,SKJ52H83DAJ5432C8,ST4HQJT6542D8C763|sv|e|pg||
+qx|o7|pn|,,,,,,,|md|1S84HAQJ642D98C987,SAQ7HT83DKQ73CJ52,SJT32HK95DAJ2CT64,SK965H7DT654CAKQ3|sv|b|pg||
+qx|c7|pn|,,,,,,,|md|1S84HAQJ642D98C987,SAQ7HT83DKQ73CJ52,SJT32HK95DAJ2CT64,SK965H7DT654CAKQ3|sv|b|pg||
+qx|o8|pn|,,,,,,,|md|2SAKJ7H9852DK965C3,SQ92HKQJ63D8CKT98,ST865HDAJ432CQJ75,S43HAT74DQT7CA642|sv|0|pg||
+qx|c8|pn|,,,,,,,|md|2SAKJ7H9852DK965C3,SQ92HKQJ63D8CKT98,ST865HDAJ432CQJ75,S43HAT74DQT7CA642|sv|0|pg||
+qx|o9|pn|,,,,,,,|md|3SAJT76HAQ5DTCA742,S852HKJ97DA643CQ3,SQ93HT84DK987CK95,SK4H632DQJ52CJT86|sv|e|pg||
+qx|c9|pn|,,,,,,,|md|3SAJT76HAQ5DTCA742,S852HKJ97DA643CQ3,SQ93HT84DK987CK95,SK4H632DQJ52CJT86|sv|e|pg||
+qx|o10|pn|,,,,,,,|md|4SK984HAT953DKCAK6,SA753HK6DQ52CQ742,S62HQJ82DA87CJ985,SQJTH74DJT9643CT3|sv|b|pg||
+qx|c10|pn|,,,,,,,|md|4SK984HAT953DKCAK6,SA753HK6DQ52CQ742,S62HQJ82DA87CJ985,SQJTH74DJT9643CT3|sv|b|pg||
+qx|o11|pn|,,,,,,,|md|1SKT972H76DK5CQJT7,S543HK8DAQ843C853,SAQJ6HQT9432DTC62,S8HAJ5DJ9762CAK94|sv|0|pg||
+qx|c11|pn|,,,,,,,|md|1SKT972H76DK5CQJT7,S543HK8DAQ843C853,SAQJ6HQT9432DTC62,S8HAJ5DJ9762CAK94|sv|0|pg||
+qx|o12|pn|,,,,,,,|md|2SA4HAK952DT97C975,SJHQ864D86CAKQT82,SKT9532HJ73DQJ2C6,SQ876HTDAK543CJ43|sv|n|pg||
+qx|c12|pn|,,,,,,,|md|2SA4HAK952DT97C975,SJHQ864D86CAKQT82,SKT9532HJ73DQJ2C6,SQ876HTDAK543CJ43|sv|n|pg||
+qx|o13|pn|,,,,,,,|md|3SAT2HJ9DT876CAKQ8,S763HKT32DQJ52CT9,S54H7654DAK9CJ652,SKQJ98HAQ8D43C743|sv|b|pg||
+qx|c13|pn|,,,,,,,|md|3SAT2HJ9DT876CAKQ8,S763HKT32DQJ52CT9,S54H7654DAK9CJ652,SKQJ98HAQ8D43C743|sv|b|pg||
+qx|o14|pn|,,,,,,,|md|4SAQHJT6DKT6CAKQ96,SJT875HA98D74CJ42,SK93HQ543DAJ852CT,S642HK72DQ93C8753|sv|0|pg||
+qx|c14|pn|,,,,,,,|md|4SAQHJT6DKT6CAKQ96,SJT875HA98D74CJ42,SK93HQ543DAJ852CT,S642HK72DQ93C8753|sv|0|pg||
+qx|o15|pn|,,,,,,,|md|1SKT83H3DK9872C865,S96HKJ9862DJT6CAK,SAQJHQT4DAQ53C743,S7542HA75D4CQJT92|sv|n|pg||
+qx|c15|pn|,,,,,,,|md|1SKT83H3DK9872C865,S96HKJ9862DJT6CAK,SAQJHQT4DAQ53C743,S7542HA75D4CQJT92|sv|n|pg||
+qx|o16|pn|,,,,,,,|md|2SJT4HT96DA632CA98,SA8762HDKQJT94CQ7,SQ3HQ732D87CJT643,SK95HAKJ854D5CK52|sv|e|pg||
+qx|c16|pn|,,,,,,,|md|2SJT4HT96DA632CA98,SA8762HDKQJT94CQ7,SQ3HQ732D87CJT643,SK95HAKJ854D5CK52|sv|e|pg||
diff --git a/test/test.pbn b/test/test.pbn new file mode 100644 index 0000000..fd0f388 --- /dev/null +++ b/test/test.pbn @@ -0,0 +1,480 @@ +[Event ""]
+[Board "1"]
+[Dealer "N"]
+[Vulnerable "None"]
+[Deal "N:65.A53.JT7.AK762 AK87.QT4.AK98.95 JT9.982.Q532.Q83 Q432.KJ76.64.JT4"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 6
+N D 5
+N H 4
+N S 3
+N NT 6
+E C 6
+E D 8
+E H 9
+E S 10
+E NT 7
+S C 6
+S D 5
+S H 4
+S S 3
+S NT 6
+W C 6
+W D 8
+W H 9
+W S 10
+W NT 7
+[Ability "N:63456 E:7A986 S:63456 W:7A986"]
+[OptimumScore "NS -420"]
+[Minimax "4SW-420"]
+
+[Event ""]
+[Board "2"]
+[Dealer "E"]
+[Vulnerable "NS"]
+[Deal "N:AQ63.J7.Q42.AKJ7 T942.T5.KT6.9643 J85.4.AJ8753.Q82 K7.AKQ98632.9.T5"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 12
+N D 12
+N H 5
+N S 10
+N NT 5
+E C 0
+E D 0
+E H 8
+E S 2
+E NT 0
+S C 12
+S D 12
+S H 5
+S S 10
+S NT 5
+W C 0
+W D 0
+W H 8
+W S 2
+W NT 0
+[Ability "N:5A5CC E:02800 S:5A5CC W:02800"]
+[OptimumScore "NS 800"]
+[Minimax "6HDE800"]
+
+[Event ""]
+[Board "3"]
+[Dealer "S"]
+[Vulnerable "EW"]
+[Deal "N:QT5.KQ9863.T7.T8 K764.A7.Q543.AQ9 AJ92.J42.KJ96.72 83.T5.A82.KJ6543"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 5
+N D 6
+N H 9
+N S 8
+N NT 5
+E C 8
+E D 6
+E H 4
+E S 5
+E NT 8
+S C 5
+S D 6
+S H 9
+S S 8
+S NT 5
+W C 8
+W D 6
+W H 4
+W S 5
+W NT 8
+[Ability "N:58965 E:85468 S:58965 W:85468"]
+[OptimumScore "NS 140"]
+[Minimax "3HS140"]
+
+[Event ""]
+[Board "4"]
+[Dealer "W"]
+[Vulnerable "All"]
+[Deal "N:Q942.J96.Q94.K73 J6.AK42.AJT83.T2 T53.753.K762.J64 AK87.QT8.5.AQ985"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 2
+N D 3
+N H 1
+N S 2
+N NT 2
+E C 11
+E D 10
+E H 12
+E S 10
+E NT 11
+S C 2
+S D 3
+S H 1
+S S 2
+S NT 2
+W C 11
+W D 10
+W H 12
+W S 11
+W NT 11
+[Ability "N:22132 E:BACAB S:22132 W:BBCAB"]
+[OptimumScore "NS -1430"]
+[Minimax "6HW-1430"]
+
+[Event ""]
+[Board "5"]
+[Dealer "N"]
+[Vulnerable "NS"]
+[Deal "N:A2.KT954.K9.JT74 KQ64..Q73.AQ8653 53.AQ8732.JT85.2 JT987.J6.A642.K9"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 3
+N D 4
+N H 10
+N S 1
+N NT 7
+E C 10
+E D 8
+E H 2
+E S 11
+E NT 5
+S C 3
+S D 4
+S H 10
+S S 1
+S NT 7
+W C 10
+W D 8
+W H 2
+W S 11
+W NT 5
+[Ability "N:71A43 E:5B28A S:71A43 W:5B28A"]
+[OptimumScore "NS -450"]
+[Minimax "5SW-450"]
+
+[Event ""]
+[Board "6"]
+[Dealer "E"]
+[Vulnerable "EW"]
+[Deal "N:KJ52.83.AJ5432.8 T4.QJT6542.8.763 AQ.AK9.QT.QJT542 98763.7.K976.AK9"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 9
+N D 11
+N H 8
+N S 9
+N NT 11
+E C 3
+E D 2
+E H 5
+E S 3
+E NT 2
+S C 9
+S D 11
+S H 8
+S S 9
+S NT 11
+W C 3
+W D 2
+W H 5
+W S 3
+W NT 2
+[Ability "N:B98B9 E:23523 S:B98B9 W:23523"]
+[OptimumScore "NS 460"]
+[Minimax "3NS460"]
+
+[Event ""]
+[Board "7"]
+[Dealer "S"]
+[Vulnerable "All"]
+[Deal "N:JT32.K95.AJ2.T64 K965.7.T654.AKQ3 84.AQJ642.98.987 AQ7.T83.KQ73.J52"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 3
+N D 3
+N H 7
+N S 4
+N NT 6
+E C 9
+E D 10
+E H 6
+E S 9
+E NT 6
+S C 3
+S D 3
+S H 7
+S S 4
+S NT 6
+W C 9
+W D 10
+W H 6
+W S 9
+W NT 6
+[Ability "N:64733 E:696A9 S:64733 W:696A9"]
+[OptimumScore "NS -140"]
+[Minimax "1SW-140"]
+
+[Event ""]
+[Board "8"]
+[Dealer "W"]
+[Vulnerable "None"]
+[Deal "N:T865..AJ432.QJ75 43.AT74.QT7.A642 AKJ7.9852.K965.3 Q92.KQJ63.8.KT98"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 5
+N D 10
+N H 4
+N S 9
+N NT 5
+E C 6
+E D 3
+E H 9
+E S 4
+E NT 8
+S C 5
+S D 10
+S H 4
+S S 9
+S NT 5
+W C 7
+W D 3
+W H 9
+W S 4
+W NT 8
+[Ability "N:594A5 E:84936 S:594A5 W:84937"]
+[OptimumScore "NS 100"]
+[Minimax "4HDE100"]
+
+[Event ""]
+[Board "9"]
+[Dealer "N"]
+[Vulnerable "EW"]
+[Deal "N:Q93.T84.K987.K95 K4.632.QJ52.JT86 AJT76.AQ5.T.A742 852.KJ97.A643.Q3"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 9
+N D 7
+N H 8
+N S 10
+N NT 9
+E C 4
+E D 6
+E H 5
+E S 3
+E NT 4
+S C 9
+S D 7
+S H 8
+S S 10
+S NT 9
+W C 4
+W D 6
+W H 5
+W S 3
+W NT 4
+[Ability "N:9A879 E:43564 S:9A879 W:43564"]
+[OptimumScore "NS 420"]
+[Minimax "4SS420"]
+
+[Event ""]
+[Board "10"]
+[Dealer "E"]
+[Vulnerable "All"]
+[Deal "N:62.QJ82.A87.J985 QJT.74.JT9643.T3 K984.AT953.K.AK6 A753.K6.Q52.Q742"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 8
+N D 5
+N H 10
+N S 7
+N NT 8
+E C 4
+E D 7
+E H 3
+E S 5
+E NT 4
+S C 9
+S D 5
+S H 10
+S S 7
+S NT 8
+W C 4
+W D 7
+W H 3
+W S 5
+W NT 4
+[Ability "N:87A58 E:45374 S:87A59 W:45374"]
+[OptimumScore "NS 620"]
+[Minimax "4HS620"]
+
+[Event ""]
+[Board "11"]
+[Dealer "S"]
+[Vulnerable "None"]
+[Deal "N:AQJ6.QT9432.T.62 8.AJ5.J9762.AK94 KT972.76.K5.QJT7 543.K8.AQ843.853"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 3
+N D 1
+N H 7
+N S 8
+N NT 3
+E C 9
+E D 12
+E H 6
+E S 5
+E NT 8
+S C 3
+S D 1
+S H 7
+S S 8
+S NT 3
+W C 9
+W D 12
+W H 6
+W S 5
+W NT 8
+[Ability "N:38713 E:856C9 S:38713 W:856C9"]
+[OptimumScore "NS -800"]
+[Minimax "6SDS-800"]
+
+[Event ""]
+[Board "12"]
+[Dealer "W"]
+[Vulnerable "NS"]
+[Deal "N:KT9532.J73.QJ2.6 Q876.T.AK543.J43 A4.AK952.T97.975 J.Q864.86.AKQT82"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 3
+N D 3
+N H 7
+N S 7
+N NT 5
+E C 10
+E D 9
+E H 5
+E S 5
+E NT 8
+S C 3
+S D 3
+S H 7
+S S 7
+S NT 5
+W C 10
+W D 9
+W H 5
+W S 5
+W NT 8
+[Ability "N:57733 E:8559A S:57733 W:8559A"]
+[OptimumScore "NS -130"]
+[Minimax "2CW-130"]
+
+[Event ""]
+[Board "13"]
+[Dealer "N"]
+[Vulnerable "All"]
+[Deal "N:54.7654.AK9.J652 KQJ98.AQ8.43.743 AT2.J9.T876.AKQ8 763.KT32.QJ52.T9"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 9
+N D 8
+N H 6
+N S 5
+N NT 8
+E C 4
+E D 5
+E H 7
+E S 8
+E NT 5
+S C 9
+S D 8
+S H 6
+S S 5
+S NT 8
+W C 4
+W D 5
+W H 7
+W S 8
+W NT 5
+[Ability "N:85689 E:58754 S:85689 W:58754"]
+[OptimumScore "NS 120"]
+[Minimax "2NS120"]
+
+[Event ""]
+[Board "14"]
+[Dealer "E"]
+[Vulnerable "None"]
+[Deal "N:K93.Q543.AJ852.T 642.K72.Q93.8753 AQ.JT6.KT6.AKQ96 JT875.A98.74.J42"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 11
+N D 11
+N H 11
+N S 9
+N NT 11
+E C 1
+E D 0
+E H 2
+E S 4
+E NT 1
+S C 11
+S D 11
+S H 11
+S S 9
+S NT 11
+W C 0
+W D 0
+W H 2
+W S 4
+W NT 0
+[Ability "N:B9BBB E:14201 S:B9BBB W:04200"]
+[OptimumScore "NS 460"]
+[Minimax "3NS460"]
+
+[Event ""]
+[Board "15"]
+[Dealer "S"]
+[Vulnerable "NS"]
+[Deal "N:AQJ.QT4.AQ53.743 7542.A75.4.QJT92 KT83.3.K9872.865 96.KJ9862.JT6.AK"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 6
+N D 9
+N H 2
+N S 8
+N NT 6
+E C 7
+E D 3
+E H 9
+E S 4
+E NT 4
+S C 6
+S D 9
+S H 2
+S S 8
+S NT 6
+W C 7
+W D 3
+W H 9
+W S 4
+W NT 4
+[Ability "N:68296 E:44937 S:68296 W:44937"]
+[OptimumScore "NS -140"]
+[Minimax "3HW-140"]
+
+[Event ""]
+[Board "16"]
+[Dealer "W"]
+[Vulnerable "EW"]
+[Deal "N:Q3.Q732.87.JT643 K95.AKJ854.5.K52 JT4.T96.A632.A98 A8762..KQJT94.Q7"]
+[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
+N C 5
+N D 2
+N H 3
+N S 2
+N NT 3
+E C 8
+E D 11
+E H 9
+E S 10
+E NT 10
+S C 5
+S D 2
+S H 3
+S S 2
+S NT 3
+W C 8
+W D 11
+W H 9
+W S 10
+W NT 10
+[Ability "N:32325 E:AA9B8 S:32325 W:AA9B8"]
+[OptimumScore "NS -630"]
+[Minimax "3NW-630"]
+
diff --git a/test/test.rzd b/test/test.rzd Binary files differnew file mode 100644 index 0000000..e94921b --- /dev/null +++ b/test/test.rzd diff --git a/tests.py b/tests.py new file mode 100644 index 0000000..4e9b8ee --- /dev/null +++ b/tests.py @@ -0,0 +1,26 @@ +import filecmp, itertools, os, sys, tempfile + +pybcddpath = os.path.realpath(os.path.join(os.path.dirname(__file__), 'pybcdd')) +sys.path.append(pybcddpath) + +from dealconvert import DealConverter + +import pytest + + +formats = ['ber', 'bhg', 'bri', 'cds', 'csv', 'dge', 'dlm', 'dup', 'lin', 'pbn', 'rzd'] +format_files = ['test.' + f for f in formats] + ['test-jfr.pbn'] +test_data = [(d[0], d[1], d[1] == 'test-jfr.pbn') for d in itertools.product(format_files, format_files)] + + +@pytest.mark.parametrize("input_file, output_file, jfr_only", test_data) +def test_conversion(input_file, output_file, jfr_only): + input_path = os.path.join(os.path.dirname(__file__), 'test', input_file) + output_path = os.path.join(tempfile.mkdtemp(), output_file) + ref_path = os.path.join(os.path.dirname(__file__), 'test', output_file) + print(input_path, output_path, ref_path) + converter = DealConverter( + input_path, + jfr_only=jfr_only) + converter.output([output_path]) + assert filecmp.cmp(output_path, ref_path) |