summaryrefslogtreecommitdiff
path: root/tests/test-snprintf-posix.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-03-07 02:02:17 +0000
committerBruno Haible <bruno@clisp.org>2007-03-07 02:02:17 +0000
commita86f85cb985fb4659ef5f242b8e11813d1eb282a (patch)
tree8da2ee96105cea7ac80da62928db5d80b8ac1f28 /tests/test-snprintf-posix.c
parenta6a6531cc5b25d5e8039a101a9c988a0f645b2d0 (diff)
downloadgnulib-a86f85cb985fb4659ef5f242b8e11813d1eb282a.tar.gz
Tests for module 'snprintf-posix'.
Diffstat (limited to 'tests/test-snprintf-posix.c')
-rw-r--r--tests/test-snprintf-posix.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/test-snprintf-posix.c b/tests/test-snprintf-posix.c
new file mode 100644
index 0000000000..e35e5d4e44
--- /dev/null
+++ b/tests/test-snprintf-posix.c
@@ -0,0 +1,41 @@
+/* Test of POSIX compatible snprintf() function.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define ASSERT(expr) if (!(expr)) abort ();
+
+#include "test-snprintf-posix.h"
+
+int
+main (int argc, char *argv[])
+{
+ test_function (snprintf);
+ return 0;
+}