diff options
author | Carlos O'Donell <carlos@redhat.com> | 2020-03-27 17:03:36 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2020-04-15 22:31:40 -0400 |
commit | c580e6466d6da8262820cdbad19f32c5546226cf (patch) | |
tree | 99e73b8ab0eab515886cf4ce378be54873f5a494 /iconvdata/Makefile | |
parent | 70dfcd9b6c6fab492380a33b79e99cb9f9f438e9 (diff) | |
download | glibc-c580e6466d6da8262820cdbad19f32c5546226cf.zip glibc-c580e6466d6da8262820cdbad19f32c5546226cf.tar.gz glibc-c580e6466d6da8262820cdbad19f32c5546226cf.tar.bz2 |
Reset converter state after second wchar_t output (Bug 25734)
An input BIG5-HKSCS character may be converted into at most 2 wchar_t
characters. After outputting the second whcar_t character (which was
saved in the converter state) we must reset the state. If we fail
to reset the state we will be stuck continually copying that
character to the output even if we have further input to consider.
We add a new test case that covers the 4 BIG5-HKSCS characters
that may become 2 wchar_t characters.
Reviewed-by: Tom Honermann <tom@honermann.net>
Diffstat (limited to 'iconvdata/Makefile')
-rw-r--r-- | iconvdata/Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/iconvdata/Makefile b/iconvdata/Makefile index c83962f..4ec2741 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -73,7 +73,7 @@ modules.so := $(addsuffix .so, $(modules)) ifeq (yes,$(build-shared)) tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ - bug-iconv10 bug-iconv11 bug-iconv12 + bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 ifeq ($(have-thread-library),yes) tests += bug-iconv3 endif @@ -275,16 +275,21 @@ endif endif endif -include ../Rules - ifeq ($(run-built-tests),yes) -LOCALES := de_DE.UTF-8 +LOCALES := \ + de_DE.UTF-8 \ + zh_HK.BIG5-HKSCS \ + $(NULL) + include ../gen-locales.mk $(objpfx)bug-iconv6.out: $(gen-locales) $(objpfx)tst-iconv7.out: $(gen-locales) +$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: $(gen-locales) endif +include ../Rules + # Set libof-* for each routine. cpp-srcs-left := $(modules) $(generated-modules) $(libJIS-routines) \ $(libKSC-routines) $(libGB-routines) $(libCNS-routines) \ @@ -340,3 +345,7 @@ tst-tables-clean: $(objpfx)gconv-modules: gconv-modules cat $(sysdeps-gconv-modules) $^ > $@ + +# Test requires BIG5HKSCS. +$(objpfx)tst-iconv-big5-hkscs-to-2ucs4.out: $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) |