aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/ijar/test/IjarTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/ijar/test/IjarTests.java')
-rw-r--r--third_party/ijar/test/IjarTests.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/third_party/ijar/test/IjarTests.java b/third_party/ijar/test/IjarTests.java
index f8e487ff64..6be993290f 100644
--- a/third_party/ijar/test/IjarTests.java
+++ b/third_party/ijar/test/IjarTests.java
@@ -250,7 +250,7 @@ public class IjarTests {
Enumeration<JarEntry> entries = jf.entries();
while (entries.hasMoreElements()) {
JarEntry je = entries.nextElement();
- if (!je.getName().endsWith(".class")) {
+ if (!je.getName().endsWith(".class") && !je.getName().endsWith(".kotlin_module")) {
continue;
}
classes.put(je.getName(), ByteStreams.toByteArray(jf.getInputStream(je)));
@@ -285,6 +285,15 @@ public class IjarTests {
}
@Test
+ public void kotlinModule() throws Exception {
+ Map<String, byte[]> lib = readJar("third_party/ijar/test/kotlin_module-interface.jar");
+ assertThat(lib.keySet())
+ .containsExactly("java/lang/String.class", "META-INF/bar.kotlin_module");
+ // ijar passes kotlin modules through unmodified
+ assertThat(new String(lib.get("META-INF/bar.kotlin_module"), UTF_8)).isEqualTo("hello");
+ }
+
+ @Test
public void testTargetLabel() throws Exception {
try (JarFile jf =
new JarFile("third_party/ijar/test/interface_ijar_testlib_with_target_label.jar")) {