X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Fdebug.t;h=f28d4b5f7a8d50e1818b3dacf264decd5efa370d;hb=68b8ba54e535ba5e68e044b3bedec73b20500b72;hp=ffcb21f01844d1728b3858e3fdea99868c16157c;hpb=4faaf174b94290230f2ebb2cc5077bc11752f69c;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/debug.t b/t/storage/debug.t index ffcb21f..f28d4b5 100644 --- a/t/storage/debug.t +++ b/t/storage/debug.t @@ -55,9 +55,11 @@ END { open(STDERRCOPY, '>&STDERR'); +my $exception_line_number; # STDERR will be closed, no T::B diag in blocks my $exception = try { close(STDERR); + $exception_line_number = __LINE__ + 1; # important for test, do not reformat $schema->resultset('CD')->search({})->count; } catch { $_ @@ -66,7 +68,11 @@ my $exception = try { open(STDERR, '>&STDERRCOPY'); }; -like $exception, qr/\QDuplication of STDERR for debug output failed (perhaps your STDERR is closed?)/; +like $exception, qr/ + \QDuplication of STDERR for debug output failed (perhaps your STDERR is closed?)\E + .+ + \Qat @{[__FILE__]} line $exception_line_number\E$ +/xms; my @warnings; $exception = try {