+2010-04-21 Simon Josefsson <simon@josefsson.org>
+
+ * tests/test-vasprintf.c: Test %08lx.
+
2010-04-20 Eric Blake <eblake@redhat.com>
tests: be robust to ignored SIGPIPE
ASSERT (strcmp (result, "12345") == 0);
free (result);
}
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ char *result;
+ int retval = my_asprintf (&result, "%08lx", 12345);
+ ASSERT (retval == 8);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00003039") == 0);
+ free (result);
+ }
}
static void
ASSERT (strcmp (result, "12345") == 0);
free (result);
}
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ char *result;
+ int retval = asprintf (&result, "%08lx", 12345);
+ ASSERT (retval == 8);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00003039") == 0);
+ free (result);
+ }
}
int