Commits

Shlomi Fish committed 8206466

Add a test for the flattened hash of arguments.

Comments (0)

Files changed (1)

modules/Text-Sprintf-Named/t/04-procedural-iface.t

 use strict;
 use warnings;
 
-use Test::More tests => 1;
+use Test::More tests => 2;
 
 use Text::Sprintf::Named qw(named_sprintf);
 
         'named_sprintf works with an hash-ref as the parameters designator',
     );
 }
+
+{
+    # TEST
+    is (
+        scalar( 
+            named_sprintf(
+                'Hello %(name)s! Are you from %(city)s?', 
+                city => "Lisbon",
+                name => "Sophie",
+            )
+        ),
+        'Hello Sophie! Are you from Lisbon?',
+        'named_sprintf works with a flattened hash of arguments',
+    );
+}