diff options
author | Jiri Vanek <[email protected]> | 2013-11-27 14:20:25 +0100 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-11-27 14:20:25 +0100 |
commit | 4e54b331710269c584f8c328fbb395789b4a5502 (patch) | |
tree | 25d5da3e9fb6208c54226da30f5620e7737cdf1c /tests/reproducers | |
parent | ac7b8213a8d58eca5341b2eef8f328ea74126f0f (diff) |
Reverted "fix to ManifestedJar1Test cases", better manifestedjar tests, added srtict test
* netx/net/sourceforge/jnlp/Parser.java: added indentation, fixes condition in strict base check
* netx/net/sourceforge/jnlp/ResourcesDesc.java: revertedt recently added throw
* tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java: (manifestedJar1main2mainNoAppDesc) adapted and (manifestedJar1main2mainNoAppDescStrict) added
Diffstat (limited to 'tests/reproducers')
-rw-r--r-- | tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java b/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java index 8b36dd9..7558585 100644 --- a/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java +++ b/tests/reproducers/simple/ManifestedJar1/testcases/ManifestedJar1Test.java @@ -35,9 +35,11 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +import java.util.Arrays; import net.sourceforge.jnlp.ProcessResult; import net.sourceforge.jnlp.ServerAccess; import net.sourceforge.jnlp.annotations.Bug; +import net.sourceforge.jnlp.runtime.Translator; import org.junit.Assert; import org.junit.Test; @@ -154,15 +156,32 @@ public class ManifestedJar1Test { /** * * Two jars, both with manifest, sboth with main tag, no app desc + * first jar is taken * */ @Test public void manifestedJar1main2mainNoAppDesc() throws Exception { String id = "ManifestedJar-1main2mainNoAppDesc"; ProcessResult pr = server.executeJavawsHeadless(null, "/" + id + ".jnlp"); + assertManifestedJar1(id, pr); + assertNotManifestedJar2(id, pr); + assertNotDead(id, pr); + } + + /** + * + * Two jars, both with manifest, sboth with main tag, no app desc + * two main jars reported + * + */ + @Test + public void manifestedJar1main2mainNoAppDescStrict() throws Exception { + String id = "ManifestedJar-1main2mainNoAppDesc"; + ProcessResult pr = server.executeJavawsHeadless(Arrays.asList(new String[]{"-strict"}), "/" + id + ".jnlp"); assertNotManifestedJar1(id, pr); assertNotManifestedJar2(id, pr); assertNotDead(id, pr); + Assert.assertTrue(pr.stderr.contains(Translator.R("PTwoMains")) || pr.stdout.contains(Translator.R("PTwoMains"))); } /** |