NAME=Java class parsing errors
FILE=bins/java/TryWithResources.class
CMDS=?e nop
EXPECT=<<EOF
nop
EOF
RUN

NAME=detect kotlin in java classes
FILE=bins/java/HiKt.class
CMDS=i~lang[1]
EXPECT=<<EOF
kotlin
EOF
RUN

NAME=java disasm crash
FILE=bins/java/ExCaseTableSwitch.class
CMDS=pd 10 >/dev/null
EXPECT=<<EOF
EOF
RUN

NAME=java switch crash
FILE=bins/fuzzed/zin7a5.class
CMDS=<<EOF
e scr.null=true
pd 100
EOF
EXPECT=<<EOF
EOF
RUN

NAME=java classes
FILE=bins/java/DemoTest.class
CMDS=ic
EXPECT=<<EOF
0x00000000 [0x00000190 - 0x00000211]    129 class 0 DemoTest :: java/lang/Object
0x00000190 method 0      fun
0x000001b9 method 1      <init>
0x000001e8 method 2      res
0x00000211 method 3      main
EOF
RUN

NAME=java classes summary
FILE=bins/java/DemoTest.class
CMDS=java summary
EXPECT=<<EOF
Summary for bins/java/DemoTest.class:
  Size 0x0:
  Constants  size: 0x166 count: 34:
  Methods    size: 0xb6 count: 4:
  Fields     size: 0x2 count: 0:
  Attributes size: 0xa count: 1:
  Interfaces size: 0x2 count: 0:
EOF
RUN

NAME=java old format support
FILE=bins/java/invisible.class
CMDS=pi 3
EXPECT=<<EOF
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "See if you can decompile/disassemble me!"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
EOF
RUN
