Commits

Anonymous committed 2b845db

Added the rest of the conversion characters.

Comments (0)

Files changed (2)

modules/Text-Sprintf-Named/lib/Text/Sprintf/Named.pm

 
     my $format = $self->_fmt;
 
-    $format =~ s/%(%|\(([a-zA-Z_]\w*)\)([ds]))/
+    $format =~ s/%(%|\(([a-zA-Z_]\w*)\)([DEFGOUXbcdefgiopsux]))/
         $self->_conversion({
             format_args => $args,
             named_params => $named_params,

modules/Text-Sprintf-Named/t/01-use.t

 use strict;
 use warnings;
 
-use Test::More tests => 8;
+use Test::More tests => 9;
 
 use Text::Sprintf::Named;
 
     );
 }
 
+{
+    # TEST
+    is (n_s("You have 0x%(bytes)x bytes left, and your lucky character is %(mychar)c", 
+            {bytes => 500, mychar => ord('C'),}),
+        "You have 0x1f4 bytes left, and your lucky character is C",
+        "Testing the %(name)x and %(name)c conversions"
+    );
+}