diff options
author | Russ Allbery <rra@stanford.edu> | 2010-08-25 15:08:05 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2010-08-25 15:08:05 -0700 |
commit | 468ded4c2fae05a815bef91bdcb17d52f9cdcb2b (patch) | |
tree | b2b836734664367c03691a8594684187a1be4054 /tests/portable | |
parent | 32dc393016f0b6241dbf8d405638e18a33bb9b62 (diff) |
Update to rra-c-util 2.6 and C TAP Harness 1.5
Update to C TAP Harness 1.5:
* Better reporting of fatal errors in the test suite.
* Summarize results at the end of test execution.
* Add tests/HOWTO from docs/writing-tests in C TAP Harness.
Update to rra-c-util 2.6:
* Fix portability to bundled Heimdal on OpenBSD.
* Improve checking for krb5_kt_free_entry with older MIT Kerberos.
* Fix portability for missing krb5_get_init_creds_opt_free.
* Fix header guard for util/xwrite.h.
* Restore default compiler configuration after GSS-API library probe.
Diffstat (limited to 'tests/portable')
-rw-r--r-- | tests/portable/snprintf-t.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/portable/snprintf-t.c b/tests/portable/snprintf-t.c index ca6ae61..fd4c228 100644 --- a/tests/portable/snprintf-t.c +++ b/tests/portable/snprintf-t.c @@ -2,7 +2,7 @@ * snprintf test suite. * * Written by Russ Allbery <rra@stanford.edu> - * Copyright 2009 Board of Trustees, Leland Stanford Jr. University + * Copyright 2009, 2010 Board of Trustees, Leland Stanford Jr. University * Copyright (c) 2004, 2005, 2006 * by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, @@ -17,6 +17,12 @@ #include <tests/tap/basic.h> /* + * Disable the requirement that format strings be literals. We need variable + * formats for easy testing. + */ +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + +/* * Intentionally don't add the printf attribute here since we pass a * zero-length printf format during testing and don't want warnings. */ @@ -86,7 +92,7 @@ static unsigned long long ullong_nums[] = { static void -test_format(bool truncate, const char *expected, int count, +test_format(bool trunc, const char *expected, int count, const char *format, ...) { char buf[128]; @@ -94,7 +100,7 @@ test_format(bool truncate, const char *expected, int count, va_list args; va_start(args, format); - result = test_vsnprintf(buf, truncate ? 32 : sizeof(buf), format, args); + result = test_vsnprintf(buf, trunc ? 32 : sizeof(buf), format, args); va_end(args); is_string(expected, buf, "format %s, wanted %s", format, expected); is_int(count, result, "...and output length correct"); |