diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-08-22 18:40:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-08-22 18:40:06 +0000 |
commit | c7509e31d1e3d3b55ddab87447b89de72b8f444c (patch) | |
tree | 3de598a55c8e0de7050fde18b0edc21f1659495b | |
parent | bed381426f198a1cd35cc78795ba2705d10f9580 (diff) | |
download | glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.tar glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.tar.gz glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.tar.bz2 glibc-c7509e31d1e3d3b55ddab87447b89de72b8f444c.zip |
Update.
* libio/Makefile (tests): Add tst-sscanf.
* libio/tst-sscanf.c: New file.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | libio/Makefile | 2 | ||||
-rw-r--r-- | libio/tst-sscanf.c | 20 |
3 files changed, 24 insertions, 1 deletions
@@ -3,6 +3,9 @@ * stdio-common/vfscanf.c: Fix handling of %l[]. Reported by Mitsuru Chinen <mchinen@yamato.ibm.com>. + * libio/Makefile (tests): Add tst-sscanf. + * libio/tst-sscanf.c: New file. + * elf/dl-addr.c (_dl_addr): Fix tests to determine dli_sname. * malloc/mtrace.c (tr_where): dli_sname always points to a non-empty string if != NULL. diff --git a/libio/Makefile b/libio/Makefile index ced5c93568..a10b7dfaa8 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -48,7 +48,7 @@ routines := \ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \ - tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf + tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf test-srcs = test-freopen all: # Make this the default target; it will be defined in Rules. diff --git a/libio/tst-sscanf.c b/libio/tst-sscanf.c new file mode 100644 index 0000000000..b1a2b8487e --- /dev/null +++ b/libio/tst-sscanf.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <wchar.h> + +#define WCS_LENGTH 256 + +int +main (void) +{ + const char cnv[] ="%l[abc]"; + const char str[] = "abbcXab"; + wchar_t wcs[WCS_LENGTH]; + int result = 0; + + sscanf (str, cnv, wcs); + printf ("wcs = \"%ls\"\n", wcs); + fflush (stdout); + result = wcscmp (wcs, L"abbc") != 0; + + return result; +} |