<commit_before>use Test::More;
use Module::Load;
use File::Basename;
use File::Spec;
use Cwd 'abs_path';

use_ok('Alien::MuPDF');

SKIP: {
	eval { load 'Inline::C' } or do {
		my $error = $@;
		skip "Inline::C not installed", 1 if $error;
	};

	skip "Build issues on Strawberry Perl for Windows."
		." See issue at <https://github.com/project-renard/p5-Alien-MuPDF/issues/30>."
		if $^O eq 'MSWin32';
	

	Inline->import( with => qw(Alien::MuPDF) );

	subtest 'Retrieve a constant' => sub {
		Inline->bind( C => q|
			char* get_fitz_version() {
				return FZ_VERSION;
			}
		|, ENABLE => AUTOWRAP => );

		# single digit for the major version,
		# multiple digits for the minor version,
		# followed by optional letter
		like( get_fitz_version(), qr/^\d\.\d+[a-z]?$/);
	};

	subtest 'Call a function' => sub {
		Inline->bind( C => q|
			int can_create_context() {
				fz_context* ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
				return NULL != ctx;
			}
		|, ENABLE => AUTOWRAP => );

		# single digit for the major version,
		# multiple digits for the minor version,
		# followed by optional letter
		ok( can_create_context(), 'fz_context* created');;
	};

}

done_testing;
<commit_msg>Remove space<commit_after>use Test::More;
use Module::Load;
use File::Basename;
use File::Spec;
use Cwd 'abs_path';

use_ok('Alien::MuPDF');

SKIP: {
	eval { load 'Inline::C' } or do {
		my $error = $@;
		skip "Inline::C not installed", 1 if $error;
	};

	skip "Build issues on Strawberry Perl for Windows."
		." See issue at <https://github.com/project-renard/p5-Alien-MuPDF/issues/30>."
		if $^O eq 'MSWin32';


	Inline->import( with => qw(Alien::MuPDF) );

	subtest 'Retrieve a constant' => sub {
		Inline->bind( C => q|
			char* get_fitz_version() {
				return FZ_VERSION;
			}
		|, ENABLE => AUTOWRAP => );

		# single digit for the major version,
		# multiple digits for the minor version,
		# followed by optional letter
		like( get_fitz_version(), qr/^\d\.\d+[a-z]?$/);
	};

	subtest 'Call a function' => sub {
		Inline->bind( C => q|
			int can_create_context() {
				fz_context* ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
				return NULL != ctx;
			}
		|, ENABLE => AUTOWRAP => );

		# single digit for the major version,
		# multiple digits for the minor version,
		# followed by optional letter
		ok( can_create_context(), 'fz_context* created');;
	};

}

done_testing;

{'fraction_non_alphanumeric': 0.15661641541038526, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 3.620889748549323, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 2, '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': '3127149', 'n_tokens_mistral': 971, 'n_tokens_neox': 886, 'n_words': 241}