X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fexample.t;h=7ab914a8efe1fd6c450cac5dc98b9a69e35a369d;hb=8869aac797e5484c14f2130d4b7c47e5cd1f627a;hp=207d5568ee12200dc52d908592ec7a85ac1d71d5;hpb=961344772da2cb9fc725dc4d328201c339eb784f;p=p5sagit%2Flib-with-preamble.git diff --git a/t/example.t b/t/example.t index 207d556..7ab914a 100644 --- a/t/example.t +++ b/t/example.t @@ -3,6 +3,7 @@ use warnings FATAL => 'all'; use if $] <= 5.010000, 'Test::More', skip_all => 'This test requires 5.10'; use Test::More qw(no_plan); use lib::with::preamble 'use v5.10;', 't/lib'; +use File::Spec; ok(eval { require my_given_example; 1 }, 'Loaded module'); @@ -12,5 +13,5 @@ is(result_for(1), 'positive'); is(result_for(-1), 'negative'); is(result_for(0), 'zero'); -is(my_given_example::my_file(), 't/lib/my_given_example.pm'); +is(my_given_example::my_file(), File::Spec->catfile(qw(t lib my_given_example.pm))); is(my_given_example::my_line(), 12);