<commit_before>#!/usr/bin/perl

use strict;
use warnings;

my $pc = Pod::Cats::Test->new();
chomp(my @lines = <DATA>);
$pc->parse_lines(@lines);

package Pod::Cats::Test;

use Data::Dumper;
use Test::More 'no_plan';

use parent 'Pod::Cats';

sub handle_intro_begin {
    my $self = shift;
    ok(1, '+intro dispatched to handle_intro_begin');
    is_deeply($self->{begin_stack}, ['intro'], 'begin stack looks OK');
    is(shift, 'Since there is no blank line, this is part of the begin command.', 
        'Content of intro begin is OK');
}

sub handle_paragraph {
    my $self = shift;

    ok(1, 'handed to handle_paragraph');

    $self->{i} //= 0;
    if ($self->{i} == 0) {
        is(shift, 
'This is a basic paragraph in the "intro" paragraph. This line wraps at 80 characters but should be processed as a single line.',
        'Got first paragraph');
        $self->{i}++;
    }
    elsif ($self->{i} == 1) {
        is(shift, 'This is a second paragraph. The blank line is what determines that.',
        'Got second paragraph');
    }
}

sub handle_head1 {
    my $self = shift;
    ok(1, 'head1 dispatched to handle_head1');
    is(shift, 'TEST POD::CATS',
        'Content of head1 is OK');
}

1;

package main;

__DATA__<commit_msg>use pass() instead of ok(1)<commit_after>#!/usr/bin/perl

use strict;
use warnings;

my $pc = Pod::Cats::Test->new();
chomp(my @lines = <DATA>);
$pc->parse_lines(@lines);

package Pod::Cats::Test;

use Data::Dumper;
use Test::More 'no_plan';

use parent 'Pod::Cats';

sub handle_intro_begin {
    my $self = shift;
    pass('+intro dispatched to handle_intro_begin');
    is_deeply($self->{begin_stack}, ['intro'], 'begin stack looks OK');
    is(shift, 'Since there is no blank line, this is part of the begin command.', 
        'Content of intro begin is OK');
}

sub handle_paragraph {
    my $self = shift;

    pass('handed to handle_paragraph');

    $self->{i} //= 0;
    if ($self->{i} == 0) {
        is(shift, 
'This is a basic paragraph in the "intro" paragraph. This line wraps at 80 characters but should be processed as a single line.',
        'Got first paragraph');
        $self->{i}++;
    }
    elsif ($self->{i} == 1) {
        is(shift, 'This is a second paragraph. The blank line is what determines that.',
        'Got second paragraph');
    }
}

sub handle_head1 {
    my $self = shift;
    pass('head1 dispatched to handle_head1');
    is(shift, 'TEST POD::CATS',
        'Content of head1 is OK');
}

1;

package main;

__DATA__
{'fraction_non_alphanumeric': 0.15221733919296843, 'fraction_numerical': 0.009588493807431082, 'mean_word_length': 3.132013201320132, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '714896', 'n_tokens_mistral': 880, 'n_tokens_neox': 831, 'n_words': 282}