Branch Coverage

blib/lib/Games/Rezrov/StoryFile.pm
Criterion Covered Total %
branch 181 590 30.6


line true false branch
928 0 0 $places > 0 ? :
6 0 if $type == 2
0 146 if $args < 0 or $args > 15
0 634 $version >= 5 ? :
232 402 --$argc > 0 ? :
6 146 if ($$argv[0] == 0) { }
486 85 if (($GLOBAL_TEMP_OFFSET & 8192) > 0)
571 796 if (($GLOBAL_TEMP_CONTROL & 64) == 0)
448 919 $GLOBAL_TEMP_CONTROL & 128 ? :
830 68 if ($GLOBAL_TEMP_OFFSET > 1) { }
898 469 if ($GLOBAL_TEMP_CONTROL & 128 ? $_[0] : !$_[0])
0 0 if (($offset & 8192) > 0)
0 0 if (($control & 64) == 0)
0 0 $control & 128 ? :
0 0 if ($offset > 1) { }
0 0 if ($control & 128 ? $_[0] : !$_[0])
0 0 if ($second == 0) { }
0 0 elsif ($size < 0) { }
0 1 $version == 4 ? :
0 0 if ($window == 1) { }
0 0 elsif ($window == 0) { }
1 0 if ($window == -1) { }
0 0 elsif ($window < 0 or $window > 1) { }
0 0 if ($result == 0)
0 0 ($size_byte & 64) > 0 ? :
0 0 if (($size_byte & 128) > 0) { }
5 0 if ($version <= 3) { }
0 1098 if ($_[1]) { }
4586 1740 if ($_[0] > 0 and $_[0] <= 15) { }
642 1098 elsif ($_[0] != 0) { }
0 0 $_[1] ? :
0 0 $_[0] != 0 ? :
0 0 $_[0] > 0 && $_[0] <= 15 ? :
0 0 $_[1] ? :
0 0 $_[0] != 0 ? :
0 0 $_[0] > 0 && $_[0] <= 15 ? :
0 0 $places > 0 ? :
0 1 if $str == 0
1 0 $str > 0 ? :
0 0 if @{$stack;} > 16
0 0 if (@{$stack;})
0 0 if ($version == 6)
0 0 if ($selecting) { }
0 0 if ($fh->open(">$filename")) { }
0 0 if (my $filename = $transcript_filename || filename_prompt('-check', 1, '-ext', 'txt')) { }
0 0 unless ($selecting)
0 0 if $fh
0 0 if ($selecting) { }
0 0 if ($fh->open(">$filename")) { }
0 0 if ($filename)
0 0 if ($fh) { }
0 0 if ($selecting) { }
0 0 $selecting ? :
0 1 if ($astr == 3) { }
0 1 elsif ($astr == 2) { }
0 1 elsif ($astr == 4) { }
0 1 elsif ($astr == 5) { }
0 1 elsif ($astr != 1) { }
0 0 if ($value == 0) { }
0 0 elsif ($value < 0) { }
0 0 $diff > 0 ? :
0 0 if ($last_score == 0)
0 0 if ($diff and Games::Rezrov::ZOptions::notifying())
0 0 if ($_[0] == 1 and Games::Rezrov::ZOptions::EMULATE_NOTIFY() and not $header->is_time_game)
0 0 if ($_[2]) { }
0 1301 if ($_[0] == 0) { }
1157 144 elsif ($_[0] <= 15) { }
1140 557 if ($GLOBAL_TEMP_CONTROL == 0) { }
0 0 if ($where == 0) { }
0 0 $i < $stat ? :
969 0 1 unless $rows and $columns
974 0 1 if ($zio->can_split)
977 0 0 if ($zio->fixed_font_default) { }
1002 0 2 if (is_this_game(@v))
1016 0 1 if $version > 3
1022 0 1 if (Games::Rezrov::ZOptions::EMULATE_UNDO() and $zdict->get_dictionary_address('undo'))
1036 0 1 if ($version <= 3 and $zio->can_split and not $zio->manual_status_line)
1069 0 2 unless open GAME, $game_filename
1071 1 1 if ($just_version) { }
1082 1 0 if (read(GAME, $buf, 1) == 1) { }
1090 0 1 unless $read == $size
1183 0 352 if ($_[0] == 16)
1187 0 0 $_[1] & 1 ? :
1202 1 1 if $zdict
1219 0 1 if ($header->version == 6) { }
1272 150 0 if ($version >= 1 and $version <= 3) { }
0 0 elsif ($version == 4 or $version == 5) { }
0 0 elsif ($version == 6 or $version == 7) { }
0 0 elsif ($version == 8) { }
1277 0 0 $_[1] == 1 ? :
1294 142 0 if ($call_type == 2) { }
0 0 elsif ($call_type != 1) { }
1308 0 0 if ($_[0] == 0) { }
0 0 elsif ($_[0] <= 15) { }
1312 0 0 if ($_[1]) { }
1355 0 0 if ($_[0] == 0) { }
0 0 elsif ($_[0] <= 15) { }
1359 0 0 if ($_[1]) { }
1397 55 244 if $_ == $first
1448 8 0 if (my $zobj = get_zobject($object))
1457 3 0 if (my $zobj = get_zobject($object))
1475 0 35 if ($$selected_streams[3]) { }
1484 35 0 if ($$selected_streams[1])
1488 0 35 if ($$selected_streams[5] and $current_window == 0) { }
1495 35 0 if ($buffering and $current_window != 1) { }
1499 0 0 if ($_ == 13) { }
1510 0 35 if ($$selected_streams[2] and $current_window == 0)
1515 0 0 if (my $fh = $$zios[2])
1567 0 7 if $_[1]
1583 0 4 unless $object
1590 3 1 if ($player_object)
1592 0 3 if $player_object == $object
1593 0 3 if ($tailing)
1595 0 0 if ($tailing == $object)
1606 1 3 unless ($player_confirmed)
1610 1 0 if ($object_cache->is_room($destination_obj))
1615 0 4 if (Games::Rezrov::ZOptions::SNOOP_OBJECTS())
1617 0 0 $d ? :
1628 4 0 if ($d)
1635 3 1 if ($old_child_id > 0)
1647 0 0 if ($version == 6) { }
1648 0 0 if ($_[0]) { }
1665 0 27 if ($obj1 == 0) { }
1667 0 0 $obj2 == 0 ? :
1671 0 27 if ($obj2 == 0) { }
1672 0 0 $x->get_parent_id == 0 ? :
1676 8 19 $x->get_parent_id == $obj2 ? :
1688 0 4 if $highlight
1691 0 4 if $highlight
1699 32 0 $zobj ? :
1709 23 0 $zobj ? :
1721 21 0 $zobj ? :
1730 25 0 if (my $zobj = get_zobject($_[0])) { }
1745 0 0 if ($version >= 5) { }
1764 1 3 if (%candidate_po)
1792 1 0 if ($version <= 3)
1796 1 0 if (@candidates == 1)
1805 0 1 unless ($player_confirmed)
1807 0 0 if (@ok == 1) { }
0 0 elsif (keys %seen == 1) { }
1825 1 0 if $player_confirmed
1827 0 1 if @turns > 3
1830 1 0 if $player_object
1834 4 0 if $version <= 4
1837 0 4 if (@{$argv;} > 2)
1858 0 4 if (is_stream_selected(5)) { }
0 4 elsif ($guess_title) { }
1864 0 0 if ($push_command) { }
1869 0 0 if ($guessing_title)
1871 0 0 if ($suppressed =~ /\s*(.*?)[\x0a\x0d]/)
1883 0 0 if ($guessing_title) { }
1895 0 0 if (not $game_title and $player_object)
1900 0 0 if ($zdict->get_dictionary_address('version')) { }
1916 4 0 if (Games::Rezrov::ZOptions::EMULATE_UNDO())
1925 4 0 unless (length $s)
1926 4 0 if ($current_input_stream == 1)
1931 4 0 if (defined $s) { }
1939 0 0 if Games::Rezrov::ZOptions::PLAYBACK_DIE()
1944 0 4 unless (length $s)
1949 0 0 if ($version <= 3) { }
0 0 elsif ($version >= 5) { }
1955 0 0 if $initial
1967 0 0 if ($s and $sz->speaking and not $s =~ /^\#speak/)
1975 4 0 if (Games::Rezrov::ZOptions::CORRECT_TYPOS())
1978 0 4 if ($msg)
1981 0 0 unless ($TYPO_NOTIFY)
1989 4 0 if (Games::Rezrov::ZOptions::EMULATE_UNDO())
1990 0 4 if ($s eq 'undo') { }
1992 0 0 if (@{$undo_slots;}) { }
1995 0 0 if (@{$undo_slots;})
1996 0 0 scalar @{$undo_slots;} == 1 ? :
2004 0 0 if ($player_object)
2011 0 0 if (my $parent = $zstat->parent_room)
2033 0 4 if $Games::Rezrov::StoryFile::PC != $bef_pc
2047 0 4 if ($version >= 5 and $token_address == 0) { }
2058 0 4 if $version >= 5
2073 0 0 if (@{$argv;} > 1)
2082 0 0 if $code == 10
2101 0 0 unless $zio->can_split
2104 0 0 if ($zstatus->time_game) { }
2106 0 0 if (Games::Rezrov::ZOptions::TIME_24()) { }
2110 0 0 $hours > 12 ? :
0 0 $hours < 12 ? :
2119 0 0 if ($zio->manual_status_line) { }
2151 0 0 if (my $zobj = get_zobject($object))
2154 0 0 if ($tailing)
2155 0 0 if ($tailing == $zobj->object_id)
2168 12 0 if (my $zobj = get_zobject($object)) { }
2170 12 0 if ($zprop->property_exists) { }
2199 0 0 if ($zobj)
2201 0 0 if ($property == 0) { }
2208 0 0 if ($zp->property_exists) { }
2226 0 0 if (defined $form) { }
2232 0 0 ($form & 128) > 0 ? :
2242 0 0 $check_len == 1 ? :
2246 0 0 if $value == $search
2249 0 0 $found ? :
2266 0 3 if ($version >= 4) { }
2267 0 0 if ($current_window == 1) { }
2273 0 0 if (defined $$window_cursors[$current_window]) { }
2297 0 1 if $win
2304 0 1 if ($current_window == 1) { }
2318 0 29 if $_[0] == 0
2321 0 29 if ($_[0] >= 179 and $_[0] <= 218 or $_[0] >= 24 and $_[0] <= 27)
2326 0 0 if (length $trans == 1) { }
2334 0 29 if ($$selected_streams[3]) { }
2345 29 0 if ($$selected_streams[1])
2349 29 0 if ($$selected_streams[1])
2350 0 29 if ($$selected_streams[5] and $current_window == 0) { }
2357 28 1 if ($buffering and $current_window != 1) { }
2359 16 12 if ($_[0] == 13) { }
2368 1 0 if ($_[0] == 13) { }
2379 0 29 if ($$selected_streams[2] and $current_window == 0)
2385 0 0 ($_[0] || 0) == 13 ? :
2401 0 0 if ($filename)
2404 0 0 if (not $success and $quetzal->error_message)
2415 0 0 if ($version <= 3) { }
0 0 elsif ($version == 4) { }
2419 0 0 $success ? :
2431 0 0 unless ($default = $options{'-default'})
2442 0 0 if ($filename)
2443 0 0 if ($options{'-check'} and -f $filename)
2447 0 0 if ($proceed =~ /y/i) { }
2466 0 0 if ($filename)
2470 0 0 if (not $success and $quetzal->error_message)
2476 0 0 if ($version <= 3) { }
2555 0 0 unless defined $height
2556 0 0 unless defined $skip
2577 0 0 if ($skip)
2582 0 0 if ($height > 1)
2591 0 0 if ($_[0] == 3 and $font_3_disabled) { }
2602 0 0 if defined $win
2605 0 0 if ($zio->can_use_color)
2609 0 0 if ($color_code == 0) { }
0 0 elsif ($color_code == 1) { }
0 0 elsif (my $name = Games::Rezrov::ZConst::color_code_to_name($color_code)) { }
2641 0 1 if ($y < $upper_lines)
2658 1 0 if ($stream == 1) { }
0 0 elsif ($stream eq 0) { }
2662 1 0 if ($fn)
2663 1 0 if ($fn =~ /^\*main:/) { }
0 0 elsif (open TRANS_IN, $fn) { }
2670 0 0 unless defined $filename
2677 0 1 unless $ok
2696 6 11 if defined $_[0]
2698 0 17 if $current_window == 1
2720 2 2 if ($text_style == 0) { }
2758 0 0 unless $wrote_something and defined $current_window and $lower_lines and $current_window == 0
2768 0 0 if ($wrote >= $lower_lines - 1)
2799 6 29 if $flushing
2807 9 20 unless length $buffer
2815 2 18 if (Games::Rezrov::ZOptions::BEAUTIFY_LOCATIONS() and $version < 4 and likely_location(\$buffer)) { }
18 0 elsif (length $buffer) { }
2827 0 18 if ($current_window != 0) { }
0 18 elsif (not $zio->fixed_font_default) { }
2842 0 0 if ($plen < $pixels_left) { }
2854 0 0 if ++$i >= $len
2860 0 0 if ($plen < $pixels_left) { }
2870 0 0 if $i < 0
2874 0 0 unless $wrapped
2890 18 4 if ($len < $have_left) { }
2897 4 16 if (substr($buffer, $i, 1) eq ' ')
2905 0 4 unless $wrapped
2915 0 20 if $zio->speaking
2938 281 8 if ($len and $len < 50) { }
2942 202 79 unless $buffer =~ /^[A-Z]/
2945 4 75 if $buffer =~ /\W$/
2952 0 75 if $buffer =~ /^\w - /
2956 0 75 unless ($buffer =~ /[a-z]/)
2958 0 0 if $buffer =~ /[^\w ]/
2967 0 75 if ($buffer =~ /\s[a-z]+$/)
2973 0 75 if $buffer =~ /\s[a-z]\S{2,}\s+[a-z]\S{2,}/
2990 0 75 if ($buffer =~ /\s([a-z]\S*\s+){3,}/)
3000 1 74 $buffer =~ /[^\w\s,:\'\-]/ ? :
3016 0 0 if ($dict and $dict != $std_dictionary_addr) { }
3018 0 0 unless ($zd = $alternate_dictionaries{$dict})
3048 1 1 if (defined $_[0])
3050 0 1 if $header
3052 0 1 if defined $upper_lines
3058 1 1 if (defined $_[0])
3061 0 1 if $header
3062 0 1 if $version <= 3 and $zstatus
3079 0 2 if ($zio->can_use_color)
3086 0 0 if ($bg ne $dbg)
3106 0 8 if (is_stream_selected($stream))
3130 0 1115 if ($#$current_frame < 18) { }
3143 146 0 if defined $_[0]
3148 147 0 if defined $_[0]
3153 147 0 if defined $_[0]
3174 0 0 if defined $_[0]
3184 0 70 if defined $_[0]
3189 0 70 if defined $_[0]
3228 0 0 if ($_[0] == 1)
3270 0 0 if ($version < 5) { }
3278 0 0 if defined $_[0]