[jdk8u] RFR: 8186801: Add regression test to test mapping based charsets (generated at build time) [v2]

Andrew John Hughes andrew at openjdk.org
Fri Jun 23 02:55:09 UTC 2023


On Thu, 22 Jun 2023 11:28:43 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> My suggestion would be to test this test:
> 
>     * build JDK and let it generate its charset
> 
>     * then modify various *.map files and the charset definitions and check if the jtreg test picks up the changes as errors.
> 
> 
> Unfortunately, I have no idea how to automate such tests, but as a sanity test that should be fine.

Confirmed by altering the IBM01140 map:

~~~
$ git diff
diff --git a/jdk/make/data/charsetmapping/IBM1140.map b/jdk/make/data/charsetmapping/IBM1140.map
index 6a79f6cba5a..0b2f6658bcd 100644
--- a/jdk/make/data/charsetmapping/IBM1140.map
+++ b/jdk/make/data/charsetmapping/IBM1140.map
@@ -240,7 +240,7 @@
 0xee   U+00d3
 0xef   U+00d5
 0xf0   U+0030
-0xf1   U+0031
+0xf1   U+0131
 0xf2   U+0032
 0xf3   U+0033
 0xf4   U+0034

testing: IBM01140
  string de/encoding
    new String()
      Error: new String() failed
    String.getBytes()
  1 byte/char
    decode
      Error: f1 --> U+0031, expected U+0131
    decode (direct)
      Error: f1 --> U+0031, expected U+0131
  1 byte/char
    encode
U+000a --> 25 allowed for IBM0114x
      Error: U+0131 --> 3f, expected f1
    encode (direct)
U+000a --> 25 allowed for IBM0114x
      Error: U+0131 --> 3f, expected f1

...

JavaTest Message: Test threw exception: java.lang.Exception: Errors detected in 1 charset
~~~

-------------

PR Comment: https://git.openjdk.org/jdk8u/pull/43#issuecomment-1603615664


More information about the jdk8u-dev mailing list