]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | use 5.014000; | |
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use Test::More tests => 4; | |
7 | ||
8 | BEGIN { use_ok 'NetHack::NAOdash' } | |
9 | ||
10 | open my $fh, '<', 't/xlogfile'; | |
11 | my @xlog = <$fh>; | |
12 | close $fh; | |
13 | ||
14 | is_deeply naodash_xlog (@xlog), { | |
15 | numbers => { | |
16 | ascensions => 15, | |
17 | games => 85, | |
18 | maxconducts => 4, | |
19 | maxhp => 422, | |
20 | maxpoints => 3429164, | |
21 | minrealtime => 43395, | |
22 | minturns => 36028, | |
23 | totalrealtime => 1483024, | |
24 | }, | |
25 | ||
26 | checks => [qw/achieve_amulet achieve_ascended achieve_astral achieve_bell achieve_book achieve_candelabrum achieve_endgame achieve_gehennom achieve_invocation achieve_luckstone achieve_medusa achieve_sokoban combo_arc_dwa_law combo_bar_orc_cha combo_cav_gno_neu combo_hea_gno_neu combo_kni_hum_law combo_mon_hum_neu combo_pri_hum_law combo_pri_hum_neu combo_ran_elf_cha combo_rog_orc_cha combo_sam_hum_law combo_tou_hum_neu combo_val_dwa_law combo_wiz_elf_cha conduct_artiwishless conduct_atheist conduct_genocideless conduct_polypileless conduct_polyselfless conduct_vegetarian conduct_weaponless uconduct_boneless uconduct_survivor/] | |
27 | }, 'naodash_xlog'; | |
28 | ||
29 | is_deeply naodash_xlog ({include_versions => ['3.6.0']}, @xlog), { | |
30 | numbers => { | |
31 | ascensions => 1, | |
32 | games => 3, | |
33 | maxconducts => 4, | |
34 | maxhp => 397, | |
35 | maxpoints => 2903014, | |
36 | minrealtime => 86482, | |
37 | minturns => 37729, | |
38 | totalrealtime => 114994, | |
39 | }, | |
40 | ||
41 | checks => [qw/achieve_amulet achieve_ascended achieve_astral achieve_bell achieve_book achieve_candelabrum achieve_endgame achieve_gehennom achieve_invocation achieve_luckstone achieve_medusa achieve_sokoban combo_pri_hum_law conduct_atheist conduct_genocideless conduct_polypileless conduct_polyselfless uconduct_survivor/] | |
42 | }, 'naodash_xlog'; | |
43 | ||
44 | is_deeply naodash_xlog ({exclude_versions => ['3.6.0']}, @xlog), { | |
45 | numbers => { | |
46 | ascensions => 14, | |
47 | games => 82, | |
48 | maxconducts => 4, | |
49 | maxhp => 422, | |
50 | maxpoints => 3429164, | |
51 | minrealtime => 43395, | |
52 | minturns => 36028, | |
53 | totalrealtime => 1368030, | |
54 | }, | |
55 | ||
56 | checks => [qw/achieve_amulet achieve_ascended achieve_astral achieve_bell achieve_book achieve_candelabrum achieve_endgame achieve_gehennom achieve_invocation achieve_luckstone achieve_medusa achieve_sokoban combo_arc_dwa_law combo_bar_orc_cha combo_cav_gno_neu combo_hea_gno_neu combo_kni_hum_law combo_mon_hum_neu combo_pri_hum_neu combo_ran_elf_cha combo_rog_orc_cha combo_sam_hum_law combo_tou_hum_neu combo_val_dwa_law combo_wiz_elf_cha conduct_artiwishless conduct_genocideless conduct_polypileless conduct_polyselfless conduct_vegetarian conduct_weaponless uconduct_boneless uconduct_survivor/] | |
57 | }, 'naodash_xlog'; |