From 207e3571322a904190689eec9279f6c8b80caf7e Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 27 Jun 2012 00:45:34 -0700 Subject: [PATCH] diag.t: Use correct variable Multiline messages are listed in the __DATA__ section with spaces instead of line breaks. When adding proper support for multiline err- ors earlier, I made a slight mistake and caused multiline to-do mess- ages to skip the to-do code path, because I was looking them up via the name with line breaks ($name), rather than the name with line breaks modified ($key). This was causing it to fall down to the pass($key) below. I want to add more tests down there, which will fail for multiline to-do items. --- t/porting/diag.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/porting/diag.t b/t/porting/diag.t index 4eef1df..c8ae873 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -322,12 +322,12 @@ sub check_message { $ret = 1; if ( $entries{$key}{seen}++ ) { # no need to repeat entries we've tested - } elsif ($entries{$name}{todo}) { + } elsif ($entries{$key}{todo}) { TODO: { no warnings 'once'; local $::TODO = 'in DATA'; # There is no listing, but it is in the list of exceptions. TODO FAIL. - fail($name); + fail($key); diag( " Message '$name'\n from $codefn line $. is not listed in $pod\n". " (but it wasn't documented in 5.10 either, so marking it TODO)." -- 2.7.4