From e01d6f39b940d917ae445d8428b154de87888000 Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Sun, 13 Nov 2011 14:58:06 +0100 Subject: add test for Java string bug --- lib/jinterface/test/nc_SUITE_data/echo_server.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/jinterface/test/nc_SUITE_data') diff --git a/lib/jinterface/test/nc_SUITE_data/echo_server.java b/lib/jinterface/test/nc_SUITE_data/echo_server.java index 0550e4beb1..5ecb5b72a7 100644 --- a/lib/jinterface/test/nc_SUITE_data/echo_server.java +++ b/lib/jinterface/test/nc_SUITE_data/echo_server.java @@ -202,6 +202,12 @@ public class echo_server { final OtpErlangAtom o = new OtpErlangAtom(s.stringValue() .substring(3)); return o; + } else if (atomValue.equals("codepointBug") + && i instanceof OtpErlangString) { + final OtpErlangString s = (OtpErlangString) i; + final String ss = s.stringValue().substring(3, 6); + final int[] cps = OtpErlangString.stringToCodePoints(ss); + return s; } else if (atomValue.equals("utf8")) { if (i instanceof OtpErlangString) { final OtpErlangString s = (OtpErlangString) i; -- cgit v1.2.3