summaryrefslogtreecommitdiff
path: root/debug/tst-chk1.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-19 00:18:13 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-19 00:18:13 +0000
commit3115c839ed6794e4112ed74f768b7ab5542693b5 (patch)
tree7b09f21065751535d27bd6e14ca56a34f651dda2 /debug/tst-chk1.c
parent1b7007d267c8d84cb6a1a4ac71cff32a92c1fc01 (diff)
Updated to fedora-glibc-20041119T0003
Diffstat (limited to 'debug/tst-chk1.c')
-rw-r--r--debug/tst-chk1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
index 0e5ba8861d..b4607bc9f0 100644
--- a/debug/tst-chk1.c
+++ b/debug/tst-chk1.c
@@ -474,5 +474,22 @@ do_test (void)
CHK_FAIL_END
#endif
+ /* Check whether missing N$ formats are detected. */
+ CHK_FAIL2_START
+ printf ("%3$d\n", 1, 2, 3, 4);
+ CHK_FAIL2_END
+
+ CHK_FAIL2_START
+ fprintf (stdout, "%3$d\n", 1, 2, 3, 4);
+ CHK_FAIL2_END
+
+ CHK_FAIL2_START
+ sprintf (buf, "%3$d\n", 1, 2, 3, 4);
+ CHK_FAIL2_END
+
+ CHK_FAIL2_START
+ snprintf (buf, sizeof (buf), "%3$d\n", 1, 2, 3, 4);
+ CHK_FAIL2_END
+
return ret;
}