<commit_before>use Test;
plan 45;
my $r;

=begin pod
This ordinary paragraph introduces a code block:

    $this = 1 * code('block');
    $which.is_specified(:by<indenting>);
=end pod

$r = $POD[0];
is $r.content[0], 'This ordinary paragraph introduces a code block:';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content.Str, q[$this = 1 * code('block');
$which.is_specified(:by<indenting>);];

# more fancy code blocks
=begin pod
This is an ordinary paragraph

    While this is not
    This is a code block

    =head1 Mumble mumble

    Suprisingly, this is a code block again
        (with fancy indentation too)

But this is just a text. Again

=end pod

$r = $POD[1];
is $r.content.elems, 5;
is $r.content[0], 'This is an ordinary paragraph';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, "While this is not\nThis is a code block";
isa_ok $r.content[2], Pod__Block;
is $r.content[2].content, 'Mumble mumble';
isa_ok $r.content[3], Pod__Block__Code;
is $r.content[3].content, "Suprisingly, this is a code block again\n"
                        ~ "    (with fancy indentation too)";
is $r.content[4], "But this is just a text. Again";

=begin pod

Tests for the feed operators

    ==> and <==
    
=end pod

$r = $POD[2];
is $r.content[0], 'Tests for the feed operators';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, "==> and <==";

=begin pod
Fun comes

    This is code
  Ha, what now?

 one more block of code
 just to make sure it works
  or better: maybe it'll break!
=end pod

$r = $POD[3];
is $r.content.elems, 4;
is $r.content[0], 'Fun comes';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, 'This is code';
isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content, 'Ha, what now?';
isa_ok $r.content[3], Pod__Block__Code;
is $r.content[3].content, "one more block of code\n"
                        ~ "just to make sure it works\n"
                        ~ " or better: maybe it'll break!";

=begin pod

=head1 A heading

This is Pod too. Specifically, this is a simple C<para> block

    $this = pod('also');  # Specifically, a code block

=end pod

$r = $POD[4];
is $r.content.elems, 3;
isa_ok $r.content[0], Pod__Block;
is $r.content[0].content, 'A heading';
is $r.content[1],
   'This is Pod too. Specifically, this is a simple C<para> block';
isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content,
   q[$this = pod('also');  # Specifically, a code block];

=begin pod
    this is code

    =for podcast
        this is not

    this is code

    =begin itemization
        this is not
    =end itemization

    =begin quitem
        and this is not
    =end quitem

    =item
        and this is!
=end pod

$r = $POD[5];
is $r.content.elems, 6;
isa_ok $r.content[0], Pod__Block__Code;
is $r.content[0].content, 'this is code';

isa_ok $r.content[1], Pod__Block__Named;
is $r.content[1].name, 'podcast';
is $r.content[1].content, 'this is not';

isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content, 'this is code';

isa_ok $r.content[3], Pod__Block__Named;
is $r.content[3].name, 'itemization';<commit_msg>Follow the decision about disallowing implicit code blocks in abbreviated and paragraph blocks in 04-code.t<commit_after>use Test;
plan 45;
my $r;

=begin pod
This ordinary paragraph introduces a code block:

    $this = 1 * code('block');
    $which.is_specified(:by<indenting>);
=end pod

$r = $POD[0];
is $r.content[0], 'This ordinary paragraph introduces a code block:';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content.Str, q[$this = 1 * code('block');
$which.is_specified(:by<indenting>);];

# more fancy code blocks
=begin pod
This is an ordinary paragraph

    While this is not
    This is a code block

    =head1 Mumble mumble

    Suprisingly, this is a code block again
        (with fancy indentation too)

But this is just a text. Again

=end pod

$r = $POD[1];
is $r.content.elems, 5;
is $r.content[0], 'This is an ordinary paragraph';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, "While this is not\nThis is a code block";
isa_ok $r.content[2], Pod__Block;
is $r.content[2].content, 'Mumble mumble';
isa_ok $r.content[3], Pod__Block__Code;
is $r.content[3].content, "Suprisingly, this is a code block again\n"
                        ~ "    (with fancy indentation too)";
is $r.content[4], "But this is just a text. Again";

=begin pod

Tests for the feed operators

    ==> and <==
    
=end pod

$r = $POD[2];
is $r.content[0], 'Tests for the feed operators';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, "==> and <==";

=begin pod
Fun comes

    This is code
  Ha, what now?

 one more block of code
 just to make sure it works
  or better: maybe it'll break!
=end pod

$r = $POD[3];
is $r.content.elems, 4;
is $r.content[0], 'Fun comes';
isa_ok $r.content[1], Pod__Block__Code;
is $r.content[1].content, 'This is code';
isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content, 'Ha, what now?';
isa_ok $r.content[3], Pod__Block__Code;
is $r.content[3].content, "one more block of code\n"
                        ~ "just to make sure it works\n"
                        ~ " or better: maybe it'll break!";

=begin pod

=head1 A heading

This is Pod too. Specifically, this is a simple C<para> block

    $this = pod('also');  # Specifically, a code block

=end pod

$r = $POD[4];
is $r.content.elems, 3;
isa_ok $r.content[0], Pod__Block;
is $r.content[0].content, 'A heading';
is $r.content[1],
   'This is Pod too. Specifically, this is a simple C<para> block';
isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content,
   q[$this = pod('also');  # Specifically, a code block];

=begin pod
    this is code

    =for podcast
        this is not

    this is code

    =begin itemization
        this is not
    =end itemization

    =begin quitem
        and this is not
    =end quitem

    =begin item
        and this is!
    =end item
=end pod

$r = $POD[5];
is $r.content.elems, 6;
isa_ok $r.content[0], Pod__Block__Code;
is $r.content[0].content, 'this is code';

isa_ok $r.content[1], Pod__Block__Named;
is $r.content[1].name, 'podcast';
is $r.content[1].content, 'this is not';

isa_ok $r.content[2], Pod__Block__Code;
is $r.content[2].content, 'this is code';

isa_ok $r.content[3], Pod__Block__Named;
is $r.content[3].name, 'itemization';
{'fraction_non_alphanumeric': 0.1435969868173258, 'fraction_numerical': 0.016321406151914627, 'mean_word_length': 3.475421348314607, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5474802', 'n_tokens_mistral': 2374, 'n_tokens_neox': 2298, 'n_words': 760}