You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2013/10/21 14:23:25 UTC
svn commit: r1534124 - in /apr/apr/branches/1.5.x: ./ test/testfmt.c
Author: trawick
Date: Mon Oct 21 12:23:24 2013
New Revision: 1534124
URL: http://svn.apache.org/r1534124
Log:
merge r775683 from trunk:
test APR_TIME_T_FMT along with the other format strings
Modified:
apr/apr/branches/1.5.x/ (props changed)
apr/apr/branches/1.5.x/test/testfmt.c
Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r775683
Modified: apr/apr/branches/1.5.x/test/testfmt.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/testfmt.c?rev=1534124&r1=1534123&r2=1534124&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/testfmt.c (original)
+++ apr/apr/branches/1.5.x/test/testfmt.c Mon Oct 21 12:23:24 2013
@@ -41,6 +41,17 @@ static void size_t_fmt(abts_case *tc, vo
ABTS_STR_EQUAL(tc, "0", buf);
}
+static void time_t_fmt(abts_case *tc, void *data)
+{
+ char buf[100];
+ apr_time_t var = 1;
+
+ sprintf(buf, "%" APR_TIME_T_FMT, var);
+ ABTS_STR_EQUAL(tc, "1", buf);
+ apr_snprintf(buf, sizeof(buf), "%" APR_TIME_T_FMT, var);
+ ABTS_STR_EQUAL(tc, "1", buf);
+}
+
static void off_t_fmt(abts_case *tc, void *data)
{
char buf[100];
@@ -141,6 +152,7 @@ abts_suite *testfmt(abts_suite *suite)
abts_run_test(suite, ssize_t_fmt, NULL);
abts_run_test(suite, size_t_fmt, NULL);
+ abts_run_test(suite, time_t_fmt, NULL);
abts_run_test(suite, off_t_fmt, NULL);
abts_run_test(suite, pid_t_fmt, NULL);
abts_run_test(suite, int64_t_fmt, NULL);