summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-29 04:50:16 +0100
committerSven Gothel <[email protected]>2011-11-29 04:50:16 +0100
commit60ea6727f1a089f6afd17fcea3bd7d29353af9b4 (patch)
tree17faa0b8d171f4790f33a1995e1ec1ca209aa216 /test
parentb3d5e20c04af353b246c9b2607c145f7dbd508dd (diff)
Add 'TestJarsInJar.jar' test JAR file for upcoming JarUtil tests (Jar in Jar).
Diffstat (limited to 'test')
-rw-r--r--test/TestJarsInJar/ClassInJar0.java17
-rw-r--r--test/TestJarsInJar/ClassInJar1.java10
-rw-r--r--test/TestJarsInJar/ClassInJar2.java10
-rw-r--r--test/TestJarsInJar/MANIFEST.MF4
-rw-r--r--test/TestJarsInJar/make.sh16
5 files changed, 57 insertions, 0 deletions
diff --git a/test/TestJarsInJar/ClassInJar0.java b/test/TestJarsInJar/ClassInJar0.java
new file mode 100644
index 0000000..426f412
--- /dev/null
+++ b/test/TestJarsInJar/ClassInJar0.java
@@ -0,0 +1,17 @@
+
+public class ClassInJar0 {
+ static {
+ System.err.println("ClassInJar0.init<>");
+ }
+
+ public static void ping() {
+ System.err.println("ClassInJar0.ping()");
+ }
+
+ public static void main(String args[]) {
+ System.err.println("ClassInJar0.main() start");
+ // ClassInJar1.ping();
+ // ClassInJar2.ping();
+ System.err.println("ClassInJar0.main() end");
+ }
+}
diff --git a/test/TestJarsInJar/ClassInJar1.java b/test/TestJarsInJar/ClassInJar1.java
new file mode 100644
index 0000000..ff104c1
--- /dev/null
+++ b/test/TestJarsInJar/ClassInJar1.java
@@ -0,0 +1,10 @@
+
+public class ClassInJar1 {
+ static {
+ System.err.println("ClassInJar1.init<>");
+ }
+
+ public static void ping() {
+ System.err.println("ClassInJar1.ping()");
+ }
+}
diff --git a/test/TestJarsInJar/ClassInJar2.java b/test/TestJarsInJar/ClassInJar2.java
new file mode 100644
index 0000000..2205533
--- /dev/null
+++ b/test/TestJarsInJar/ClassInJar2.java
@@ -0,0 +1,10 @@
+
+public class ClassInJar2 {
+ static {
+ System.err.println("ClassInJar2.init<>");
+ }
+
+ public static void ping() {
+ System.err.println("ClassInJar2.ping()");
+ }
+}
diff --git a/test/TestJarsInJar/MANIFEST.MF b/test/TestJarsInJar/MANIFEST.MF
new file mode 100644
index 0000000..a592879
--- /dev/null
+++ b/test/TestJarsInJar/MANIFEST.MF
@@ -0,0 +1,4 @@
+Manifest-Version: 1.0
+Rsrc-Class-Path: ClassInJar1.jar sub/ClassInJar2.jar
+Main-Class: ClassInJar0
+
diff --git a/test/TestJarsInJar/make.sh b/test/TestJarsInJar/make.sh
new file mode 100644
index 0000000..2860603
--- /dev/null
+++ b/test/TestJarsInJar/make.sh
@@ -0,0 +1,16 @@
+rm -rf classes
+rm -rf TestJarsInJar.jar
+mkdir classes
+mkdir classes/sub
+
+javac -d classes *.java
+
+cd classes
+jar cf ClassInJar1.jar ClassInJar1.class
+jar cf sub/ClassInJar2.jar ClassInJar2.class
+jar cmf ../MANIFEST.MF ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar
+#jar cf ../TestJarsInJar.jar ClassInJar0.class ClassInJar1.jar sub/ClassInJar2.jar
+cd ..
+rm -rf classes
+
+jar tf TestJarsInJar.jar