<commit_before>package TestAPR::threadmutex;

use strict;
use warnings FATAL => 'all';

use Apache::Test;
use Apache::TestUtil;

use Apache::Const -compile => 'OK';
use APR::Const -compile => qw(EBUSY SUCCESS);

sub handler {
    my $r = shift;

    plan $r, tests => 3, 'APR::ThreadMutex';

    require APR::ThreadMutex;

    my $mutex = APR::ThreadMutex->new($r->pool);

    ok $mutex;

    ok t_cmp($mutex->lock, APR::SUCCESS,
             'lock == APR::SUCCESS');

#XXX: don't get what we expect on win23
#need to use APR_STATUS_IS_EBUSY ?
#    ok t_cmp($mutex->trylock, APR::EBUSY,<commit_msg>fix the plan skip condition, which wasn't skipping the test before PR: Obtained from: Submitted by: Reviewed by:<commit_after>package TestAPR::threadmutex;

use strict;
use warnings FATAL => 'all';

use Apache::Test;
use Apache::TestUtil;

use Apache::Const -compile => 'OK';
use APR::Const -compile => qw(EBUSY SUCCESS);

sub handler {
    my $r = shift;

    plan $r, tests => 3, have 'APR::ThreadMutex';

    require APR::ThreadMutex;

    my $mutex = APR::ThreadMutex->new($r->pool);

    ok $mutex;

    ok t_cmp($mutex->lock, APR::SUCCESS,
             'lock == APR::SUCCESS');

#XXX: don't get what we expect on win23
#need to use APR_STATUS_IS_EBUSY ?
#    ok t_cmp($mutex->trylock, APR::EBUSY,
{'fraction_non_alphanumeric': 0.15076923076923077, 'fraction_numerical': 0.004615384615384616, 'mean_word_length': 3.909433962264151, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4719026', 'n_tokens_mistral': 477, 'n_tokens_neox': 439, 'n_words': 133}