1. Shlomi Fish
  2. perl-Text-Sprintf

Commits

Shlomi Fish  committed 8206466

Add a test for the flattened hash of arguments.

  • Participants
  • Parent commits d5f3e8b
  • Branches default

Comments (0)

Files changed (1)

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

View file
  • Ignore whitespace
 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',
+    );
+}