#!/usr/bin/perl use strict; use warnings; use lib 't/lib'; use ExtUtils::MakeMaker; use File::Temp qw[tempfile]; use Test::More 'no_plan'; sub test_abstract { my($code, $package, $want, $name) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; my ($fh,$file) = tempfile( DIR => 't', UNLINK => 1 ); print $fh $code; close $fh; # Hack up a minimal MakeMaker object. my $mm = bless { DISTNAME => $package }, "MM"; my $have = $mm->parse_abstract($file); my $ok = is( $have, $want, $name ); return $ok; } test_abstract(<