about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-14 07:26:22 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-14 07:26:22 +0000
commit2e22fed281f68a7db181f6cfce125b65a9b05e86 (patch)
treef45b595fd0fd11980f8d4b6887fd06bef430bc86 /libio
parent30bce7b63fdfe2fe0e86d927932ad824dcb878d5 (diff)
downloadglibc-2e22fed281f68a7db181f6cfce125b65a9b05e86.tar.gz
glibc-2e22fed281f68a7db181f6cfce125b65a9b05e86.tar.xz
glibc-2e22fed281f68a7db181f6cfce125b65a9b05e86.zip
Update.
	* libio/tst_swprintf.c (main): Add test for string argument with
	zero precision.
Diffstat (limited to 'libio')
-rw-r--r--libio/tst_swprintf.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libio/tst_swprintf.c b/libio/tst_swprintf.c
index dc16db0a0c..a82ef88e7c 100644
--- a/libio/tst_swprintf.c
+++ b/libio/tst_swprintf.c
@@ -68,8 +68,24 @@ main (int argc, char *argv[])
 	  result = 1;
 	}
       else
-	printf  ("swprintf (buf, %Zu, L\"%%s\", \"%s\") OK\n",
-		 tests[n].n, tests[n].str);
+	printf ("swprintf (buf, %Zu, L\"%%s\", \"%s\") OK\n",
+		tests[n].n, tests[n].str);
+    }
+
+  if (swprintf (buf, nbuf, L"%.0s", "foo") != 0
+      || wcslen (buf) != 0)
+    {
+      printf ("swprintf (buf, %Zu, L\"%%.0s\", \"foo\") create some output\n",
+	      nbuf);
+      result = 1;
+    }
+
+  if (swprintf (buf, nbuf, L"%.0ls", L"foo") != 0
+      || wcslen (buf) != 0)
+    {
+      printf ("swprintf (buf, %Zu, L\"%%.0ls\", L\"foo\") create some output\n",
+	      nbuf);
+      result = 1;
     }
 
   return result;