< prev index next >
test/jdk/com/sun/tools/jextract/Runner.java
Print this page
*** 114,124 ****
@Test
public void testJarManifest() throws IOException {
// Get the jar
ByteArrayOutputStream bos = new ByteArrayOutputStream();
! ctx.collectJarFile(new JarOutputStream(bos), pkg);
System.out.println("Jar built, verifying...");
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(bos.toByteArray()));
// List all classes in the jar
--- 114,124 ----
@Test
public void testJarManifest() throws IOException {
// Get the jar
ByteArrayOutputStream bos = new ByteArrayOutputStream();
! ctx.collectJarFile(new JarOutputStream(bos), new String[0], pkg);
System.out.println("Jar built, verifying...");
JarInputStream jis = new JarInputStream(new ByteArrayInputStream(bos.toByteArray()));
// List all classes in the jar
*** 126,142 ****
--- 126,144 ----
for (JarEntry e = jis.getNextJarEntry(); e != null; e = jis.getNextJarEntry()) {
if (e.isDirectory()) {
continue;
}
String name = e.getName();
+ if (! name.endsWith(".properties")) {
if (! name.endsWith(".class")) {
// Should not have file not class files
System.err.println("Warning: unexpected file " + name);
}
name = name.substring(0, name.length() - 6);
files.add(name.replace(File.separatorChar, '.'));
}
+ }
assertEquals(files, mfm.listClasses());
}
private void verifyNativeLocation(NativeLocation actual, NativeLocation expected) {
< prev index next >