in reply to Embedded test

It looks like you want Test::Inline.