(subfmt-up1): Put quotes around format string
authorJim Meyering <jim@meyering.net>
Fri, 16 Sep 2005 17:53:40 +0000 (17:53 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 16 Sep 2005 17:53:40 +0000 (17:53 +0000)
to protect `^' from interpretation by some shells.
Add a use of OUT_SUBST to compensate for Solaris strftime's slightly
different formatting of %c.

tests/misc/date

index 961d57c..97d529d 100755 (executable)
@@ -242,7 +242,10 @@ my @Tests =
 
      # Test the combination of the to-upper-case modifier (^) and a conversion
      # specifier that expands to a string containing lower case characters.
-     ['subfmt-up1', '-d "1999-12-08 7:30" +%^c',
+     ['subfmt-up1', '-d "1999-12-08 7:30" "+%^c"',
+      # Solaris 5.9 prints 'WED DEC 08 07:30:00 1999', while
+      # most others print  'WED DEC  8 07:30:00 1999'.
+      {OUT_SUBST => 's/ [ 0]8.*//'},
       {OUT=>'WED DEC  8 07:30:00 1999'}],
     );