From: Dave Rolsky Date: Tue, 12 May 2009 20:07:33 +0000 (-0500) Subject: Fix tests that tested for literal newlines in warnings, as this failed X-Git-Tag: 0.78~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eedb62c74da6ca54cda13faf09a2a0b95043a4d7;p=gitmo%2FMoose.git Fix tests that tested for literal newlines in warnings, as this failed on Win32. --- diff --git a/t/010_basics/016_load_into_main.t b/t/010_basics/016_load_into_main.t index ad598cf..fde43f0 100644 --- a/t/010_basics/016_load_into_main.t +++ b/t/010_basics/016_load_into_main.t @@ -10,10 +10,10 @@ BEGIN { plan tests => 2; } -stderr_is( sub { package main; eval 'use Moose' }, - "Moose does not export its sugar to the 'main' package.\n", - 'Moose warns when loaded from the main package' ); +stderr_like( sub { package main; eval 'use Moose' }, + qr/\QMoose does not export its sugar to the 'main' package/, + 'Moose warns when loaded from the main package' ); -stderr_is( sub { package main; eval 'use Moose::Role' }, - "Moose::Role does not export its sugar to the 'main' package.\n", - 'Moose::Role warns when loaded from the main package' ); +stderr_like( sub { package main; eval 'use Moose::Role' }, + qr/\QMoose::Role does not export its sugar to the 'main' package/, + 'Moose::Role warns when loaded from the main package' ); diff --git a/t/300_immutable/011_constructor_is_wrapped.t b/t/300_immutable/011_constructor_is_wrapped.t index 2d5413c..9eb37a8 100644 --- a/t/300_immutable/011_constructor_is_wrapped.t +++ b/t/300_immutable/011_constructor_is_wrapped.t @@ -23,9 +23,9 @@ BEGIN { extends 'ModdedNew'; - ::stderr_is( + ::stderr_like( sub { Foo->meta->make_immutable }, - "Not inlining 'new' for Foo since it is not inheriting the default Moose::Object::new\nIf you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Foo->meta->make_immutable\n ('new' has method modifiers which would be lost if it were inlined)\n", + qr/\QNot inlining 'new' for Foo since it is not inheriting the default Moose::Object::new\E\s+\QIf you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Foo->meta->make_immutable\E\s+\Q ('new' has method modifiers which would be lost if it were inlined)/, 'got a warning that Foo may not have an inlined constructor' ); }