[svn:parrot] r36269 - in trunk: src/pmc t/pmc

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Mon Feb 2 03:22:52 UTC 2009


Author: jkeenan
Date: Mon Feb  2 03:22:48 2009
New Revision: 36269
URL: https://trac.parrot.org/parrot/changeset/36269

Log:
Committing patch submitted by chromatic in http://rt.perl.org/rt3/Ticket/Display.html?id=46817

Modified:
   trunk/src/pmc/undef.pmc
   trunk/t/pmc/sub.t

Modified: trunk/src/pmc/undef.pmc
==============================================================================
--- trunk/src/pmc/undef.pmc	Mon Feb  2 02:51:41 2009	(r36268)
+++ trunk/src/pmc/undef.pmc	Mon Feb  2 03:22:48 2009	(r36269)
@@ -148,6 +148,9 @@
 */
 
     VTABLE STRING *get_string() {
+        Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
+            "Stringifying an Undef PMC");
+
         return string_make_empty(INTERP, enum_stringrep_one, 0);
     }
 

Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t	Mon Feb  2 02:51:41 2009	(r36268)
+++ trunk/t/pmc/sub.t	Mon Feb  2 03:22:48 2009	(r36269)
@@ -732,9 +732,7 @@
 back
 OUTPUT
 
-# This is the behavior of Parrot 0.4.3
-# RT #46817 Should there be a warning ?
-pir_output_is( <<'CODE', '', 'warn on in main' );
+pir_output_like( <<'CODE', '/Stringifying an Undef PMC/', 'warn on in main' );
 .sub _main :main
 .include "warnings.pasm"
     warningson .PARROT_WARNINGS_UNDEF_FLAG
@@ -761,10 +759,7 @@
 ok
 OUTPUT
 
-# RT #46819 This is the behavior of Parrot 0.4.3
-# It looks like core PMCs never emit warning.
-# Look in perlundef.t for a more sane test of 'warningson' in subs
-pir_output_is( <<'CODE', <<'OUTPUT', "warn on in sub, turn off in f2" );
+pir_output_like( <<'CODE', <<'OUTPUT', "warn on in sub, turn off in f2" );
 .sub _main :main
 .include "warnings.pasm"
     _f1()
@@ -783,8 +778,10 @@
     warningsoff .PARROT_WARNINGS_UNDEF_FLAG
 .end
 CODE
+/Stringifying an Undef PMC
+.*
 back
-ok
+ok/
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', "sub names" );


More information about the parrot-commits mailing list