summaryrefslogtreecommitdiffstats
path: root/newlib/testsuite/newlib.stdio/nulprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/testsuite/newlib.stdio/nulprintf.c')
-rw-r--r--newlib/testsuite/newlib.stdio/nulprintf.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/newlib/testsuite/newlib.stdio/nulprintf.c b/newlib/testsuite/newlib.stdio/nulprintf.c
new file mode 100644
index 000000000..5e4131bc4
--- /dev/null
+++ b/newlib/testsuite/newlib.stdio/nulprintf.c
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2014 by ARM Ltd. All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * is freely granted, provided that this notice is preserved.
+ */
+
+#include <stdio.h>
+#include "check.h"
+
+const char m[8] = {'M','M','M','M','M','M','M','M'};
+
+int main()
+{
+ printf ("%.*s\n", 8, m);
+ exit (0);
+}