diff mbox series

[5/5] Add test case for MODIFIED-UTF-7

Message ID 20200819230702.229822-6-mg@max.gautier.name
State New
Headers show
Series iconv: module for MODIFIED-UTF-7 | expand

Commit Message

Max Gautier Aug. 19, 2020, 11:07 p.m. UTC
---
Not sure if make check test stateful characters sets.
I'm not very familiar with iconv and glibc build system.
 iconvdata/TESTS                         |  1 +
 iconvdata/testdata/MODIFIED-UTF-7       | 25 +++++++++++++++++++++++++
 iconvdata/testdata/MODIFIED-UTF-7..UTF8 | 25 +++++++++++++++++++++++++
 3 files changed, 51 insertions(+)
 create mode 100644 iconvdata/testdata/MODIFIED-UTF-7
 create mode 100644 iconvdata/testdata/MODIFIED-UTF-7..UTF8

Comments

Andreas Schwab Aug. 20, 2020, 7:18 a.m. UTC | #1
On Aug 20 2020, Max Gautier via Libc-alpha wrote:

> +// The last line of this file is missing the end-of-line terminator
> +// on purpose, in order to test that the conversion empties the bit buffer
> +// and shifts back to the initial state at the end of the conversion.
> +A&ImIDkQ-

That didn't work out, the newline is present nevertheless.

Andreas.
diff mbox series

Patch

diff --git a/iconvdata/TESTS b/iconvdata/TESTS
index ef3bd43454..096598f20e 100644
--- a/iconvdata/TESTS
+++ b/iconvdata/TESTS
@@ -95,6 +95,7 @@  EUC-TW			EUC-TW			Y	UTF8
 GBK			GBK			Y	UTF8
 BIG5HKSCS		BIG5HKSCS		Y	UTF8
 UTF-7			UTF-7			N	UTF8
+MODIFIED-UTF-7		MODIFIED-UTF-7		N	UTF8
 IBM856			IBM856			N	UTF8
 IBM922			IBM922			Y	UTF8
 IBM930			IBM930			N	UTF8
diff --git a/iconvdata/testdata/MODIFIED-UTF-7 b/iconvdata/testdata/MODIFIED-UTF-7
new file mode 100644
index 0000000000..02d5681dac
--- /dev/null
+++ b/iconvdata/testdata/MODIFIED-UTF-7
@@ -0,0 +1,25 @@ 
+&EqASGxItEps-       Amharic
+&AQ0-esky      Czech
+Dansk      Danish
+English    English
+Suomi      Finnish
+Fran&AOc-ais   French
+Deutsch    German
+&A5UDuwO7A7cDvQO5A7oDrA-   Greek
+&BeIF0QXoBdkF6g-      Hebrew
+Italiano   Italian
+Norsk      Norwegian
+&BCAEQwRBBEEEOgQ4BDk-    Russian
+Espa&APE-ol    Spanish
+Svenska    Swedish
+&DiAOMg4pDjIORA4XDiI-    Thai
+T&APw-rk&AOc-e     Turkish
+Ti&Hr8-ng Vi&Hsc-t Vietnamese
+&ZeVnLIqe-     Japanese
+&Ti1lhw-       Chinese
+&1VyuAA-       Korean
+
+// The last line of this file is missing the end-of-line terminator
+// on purpose, in order to test that the conversion empties the bit buffer
+// and shifts back to the initial state at the end of the conversion.
+A&ImIDkQ-
diff --git a/iconvdata/testdata/MODIFIED-UTF-7..UTF8 b/iconvdata/testdata/MODIFIED-UTF-7..UTF8
new file mode 100644
index 0000000000..3d6ba8b535
--- /dev/null
+++ b/iconvdata/testdata/MODIFIED-UTF-7..UTF8
@@ -0,0 +1,25 @@ 
+አማርኛ       Amharic
+česky      Czech
+Dansk      Danish
+English    English
+Suomi      Finnish
+Français   French
+Deutsch    German
+Ελληνικά   Greek
+עברית      Hebrew
+Italiano   Italian
+Norsk      Norwegian
+Русский    Russian
+Español    Spanish
+Svenska    Swedish
+ภาษาไทย    Thai
+Türkçe     Turkish
+Tiếng Việt Vietnamese
+日本語     Japanese
+中文       Chinese
+한글       Korean
+
+// The last line of this file is missing the end-of-line terminator
+// on purpose, in order to test that the conversion empties the bit buffer
+// and shifts back to the initial state at the end of the conversion.
+A≢Α