diff --git a/tests/misc.src/java-interface.at b/tests/misc.src/java-interface.at index 904a07a9..3f57ce38 100644 --- a/tests/misc.src/java-interface.at +++ b/tests/misc.src/java-interface.at @@ -472,4 +472,48 @@ jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type i jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'int' jp.osscons.opensourcecobol.libcobj.ui.CobolResultSetException: The result type is not 'double' ]) +AT_CLEANUP + +AT_SETUP([Japanese]) + +AT_DATA([b.cbl], [ + identification division. + program-id. b. + data division. + linkage section. + 01 arg-1 pic 9(3). + 01 arg-2 pic N(5). + procedure division using arg-1 arg-2. + display arg-1. + display arg-2. + add 1 to arg-1. + move N"かきくけこ" to arg-2. +]) + +AT_DATA([a.java], [ +import jp.osscons.opensourcecobol.libcobj.ui.*; +public class a { + public static void main(String@<:@@:>@ args) { + b prog = new b(); + CobolResultSet rs = prog.execute(100, "あいうえお"); + try{ + int ret1 = rs.getInt(1); + String ret2 = rs.getString(2); + System.out.println("ret1: " + ret1); + System.out.println("ret2: " + ret2); + } catch(CobolResultSetException e){ + e.printStackTrace(); + } + } +} +]) + +AT_CHECK([cobj b.cbl]) +AT_CHECK([javac -encoding SJIS a.java]) +AT_CHECK([java -Dfile.encoding=SJIS a], [0], +[100 +あいうえお +ret1: 101 +ret2: かきくけこ +]) AT_CLEANUP \ No newline at end of file