6 if ( ( $Config::Config{'extensions'} !~ /\bB\b/ ) ) {
7 print "1..0 # Skip -- Perl configured without B module\n";
16 if ( $Config::Config{useithreads} ) {
17 plan( skip_all => "Perl compiled with ithreads... no invlist in the example");
22 # Somewhat minimal tests.
26 # we are going to walk this sub
28 "ABCD" !~ tr/\0-\377//c; # this is using the Latin1_invlist
34 note ref($op) . " ; NAME: ", $op->name, " ; TYPE: ", $op->type;
36 return unless ref $op eq 'B::SVOP' && $op->name eq 'trans';
40 note "SV: ", ref $sv, " = " . $sv->LEN . " " . $sv->CUR;
41 foreach my $elt ( $sv->ARRAY ) {
42 next unless ref $elt eq 'B::INVLIST';
46 is $invlist->prev_index, 0, "prev_index=0";
47 is $invlist->is_offset, 0, "is_offset = 0 (false)";
49 my @array = $invlist->get_invlist_array;
50 is scalar @array, 2, "invlist array size is 2" or diag explain \@array;
51 is $array[0], 0, "PL_Latin1 first value in the invlist array is 0" or diag explain \@array;
52 is $array[1], 256, "PL_Latin1 second value in the invlist array is 0" or diag explain \@array;
54 is $invlist->array_len(), 2, "PL_Latin1 array length is 2";
60 my $op = B::svref_2object( \*main::check );
61 B::walkoptree( $op->CV->ROOT, 'visit' );
63 ok $found_invlist, "visited one INVLIST";