tests: avoid test failure on Solaris 10 due to lack of PATH export
[pspp] / tests / test-vasnprintf-posix.c
index 66b4eb4265303dcc72508977a92893366b875f6a..c0e9ea2faccb238eda3286077d3d126e83cc6f54 100644 (file)
@@ -3658,6 +3658,19 @@ test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
       free (result);
   }
 #endif
+
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
+  /* Test that the 'I' flag is supported.  */
+  {
+    size_t length;
+    char *result =
+      my_asnprintf (NULL, &length, "%Id %d", 1234567, 99);
+    ASSERT (result != NULL);
+    ASSERT (strcmp (result, "1234567 99") == 0);
+    ASSERT (length == strlen (result));
+    free (result);
+  }
+#endif
 }
 
 static char *