git-version-gen: correct the advice in a comment
[gnulib.git] / tests / test-vsnprintf.c
index 5060836..7a52082 100644 (file)
@@ -73,5 +73,13 @@ main (int argc, char *argv[])
         }
     }
 
+  /* Test the support of the POSIX/XSI format strings with positions.  */
+  {
+    char result[100];
+    retval = my_snprintf (result, sizeof (result), "%2$d %1$d", 33, 55);
+    ASSERT (strcmp (result, "55 33") == 0);
+    ASSERT (retval == strlen (result));
+  }
+
   return 0;
 }