use strict;
my $t; use lib ($t = -e 't' ? 't' : 'test') . '/lib', 'inc';

use Test::Base tests => 1;

use lib 't/lib';

BEGIN {
    unlink "$t/lib/Testworky.pmc";
}
END {
    unlink "$t/lib/Testworky.pmc";
}

use Testworky;

# no_diff;

run_is module => 'pmc';

sub fix_up {
    s/(by worky) \d\.\d\d/$1 x.xx/;
    s/(Module::Compile) \d\.\d\d/$1 x.xx/;
    s/0x[0-9A-Z]{8}/0xXXXXXXXX/;
}

sub fix_name {
    s/t\//$t\//;
}

__DATA__
=== Compile Testworky
--- module fix_name read_file fix_up: t/lib/Testworky.pmc
--- pmc -trim fix_up
# Generated by worky 0.11 (Module::Compile 0.15) - do not edit!
################((( 32-bit Checksum Validator III )))################
#line 1
BEGIN { use 5.006; local (*F, $/); ($F = __FILE__) =~ s!c$!!; open(F)
or die "Cannot open $F: $!"; binmode(F, ':crlf'); if (unpack('%32N*',
$F=readline(*F)) != 0xXXXXXXXX) { use Filter::Util::Call; my $f = $F;
filter_add(sub { filter_del(); 1 while &filter_read; $_ = $f; 1; })}}
#line 1
package Testworky;

sub works {
    print "This works";
}

# This code no worky...
# 
# sub busted {
#     say "no worky!";
# }
# 

sub ok {
    print "ok";
}

1;
