/hg/icedtea-web: Reproducers of PR955
jvanek at icedtea.classpath.org
jvanek at icedtea.classpath.org
Mon Aug 13 03:48:41 PDT 2012
changeset ccadc46c4caa in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ccadc46c4caa
author: Jiri Vanek <jvanek at redhat.com>
date: Mon Aug 13 12:49:02 2012 +0200
Reproducers of PR955
diffstat:
ChangeLog | 19 +
tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp | 72 ++
tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp | 70 +
tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp | 69 +
tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp | 70 +
tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp | 53 +
tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java | 52 +
tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java | 356 ++++++++++
tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 31 +-
tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java | 32 +-
10 files changed, 813 insertions(+), 11 deletions(-)
diffs (truncated from 958 to 500 lines):
diff -r 57b5ee44e502 -r ccadc46c4caa ChangeLog
--- a/ChangeLog Fri Aug 10 11:42:52 2012 -0400
+++ b/ChangeLog Mon Aug 13 12:49:02 2012 +0200
@@ -1,3 +1,22 @@
+2012-08-13 Jiri Vanek <jvanek at redhat.com>
+
+ Reproducers of PR955
+ * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp:
+ * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp:
+ * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp:
+ * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp:
+ Test jnlp files with various combinations of locales, reproducers of PR955.
+ * tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp
+ Jnlp file with which is not affected by PR955 and is helping to catch error in LOCALE changing hack
+ * tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java:
+ Reproducer main class, after loading prints out default locale.
+ * tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java:
+ Testcases launching above jnlps under various locales.
+ * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
+ Added set of methods allowing passing of custom variables to ThreadedProcess.
+ * tests/test-extensions/net/sourceforge/jnlp/ThreadedProcess.java:
+ Added processing of custom variables.
+
2012-08-10 Adam Domurad <adomurad at redhat.com>
* plugin/icedteanp/IcedTeaNPPlugin.cc
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement1.jnlp Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,72 @@
+<!--
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="LocalisedInformationElement1.jnlp" codebase=".">
+ <information>
+ <title>localisedJnlp1.jnlp1</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <information locale="fr" >
+ <title>LocalisedInformationElement1.jnlp la francee</title>
+ <description>La LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <information locale="fr_BE" >
+ <title>LocalisedInformationElement1.jnlp la francee BE</title>
+ <offline/>
+ </information>
+ <information locale="fr_BE.iso88591" >
+ <title>LocalisedInformationElement1.jnlp la francee BE iso88591</title>
+ <offline/>
+ </information>
+ <information locale="cs" >
+ <title>LocalisedInformationElement1.jnlp po cesky</title>
+ <vendor>IcedTea CZ</vendor>
+ <description>Muj vlastni LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="LocalisedInformationElement.jar"/>
+ </resources>
+ <application-desc main-class="LocalisedInformationElement">
+ </application-desc>
+</jnlp>
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement2.jnlp Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,70 @@
+<!--
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="LocalisedInformationElement2.jnlp" codebase=".">
+ <information>
+ <title>localisedJnlp1.jnlp1</title>
+ <!--vendor is misisng-->
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <information locale="fr" >
+ <title>LocalisedInformationElement1.jnlp la francee</title>
+ <vendor>IcedTea</vendor>
+ <description>La LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <information locale="fr_BE" >
+ <title>LocalisedInformationElement1.jnlp la francee BE</title>
+ <!--vendor should be found by fall back-->
+ <offline/>
+ </information>
+ <information locale="cs" >
+ <title>LocalisedInformationElement1.jnlp po cesky</title>
+ <!--vendor is misisng, and not find by fallback-->
+ <description>Muj vlastni LocalisedInformationElement1.jnlp</description>
+ <offline/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="LocalisedInformationElement.jar"/>
+ </resources>
+ <application-desc main-class="LocalisedInformationElement">
+ </application-desc>
+</jnlp>
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement3.jnlp Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,69 @@
+<!--
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="LocalisedInformationElement3.jnlp" codebase=".">
+ <information>
+ <title>localisedJnlp1.jnlp1</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>D_DEF</description>
+ <offline/>
+ </information>
+ <information locale="fr" >
+ <title>LocalisedInformationElement1.jnlp la francee</title>
+ <description>D_DEF_FR</description>
+ <offline/>
+ </information>
+ <information locale="fr_BE" >
+ <title>LocalisedInformationElement1.jnlp la francee BE</title>
+ <description>D_FR_BE</description>
+ <offline/>
+ </information>
+ <information locale="cs" >
+ <title>LocalisedInformationElement1.jnlp po cesky</title>
+ <vendor>IcedTea CZ</vendor>
+ <description>D_DEF_CS</description>
+ <offline/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="LocalisedInformationElement.jar"/>
+ </resources>
+ <application-desc main-class="LocalisedInformationElement">
+ </application-desc>
+</jnlp>
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement4.jnlp Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,70 @@
+<!--
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="LocalisedInformationElement4.jnlp" codebase=".">
+ <information>
+ <title>localisedJnlp1.jnlp1</title>
+ <!--vendor is misisng-->
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>D_DEF</description>
+ <offline/>
+ </information>
+ <information locale="fr" >
+ <title>LocalisedInformationElement1.jnlp la francee</title>
+ <vendor>IcedTea</vendor>
+ <description>D_DEF_FR</description>
+ <offline/>
+ </information>
+ <information locale="fr_BE" >
+ <title>LocalisedInformationElement1.jnlp la francee BE</title>
+ <!--vendor should be found by fall back-->
+ <offline/>
+ </information>
+ <information locale="cs" >
+ <title>LocalisedInformationElement1.jnlp po cesky</title>
+ <!--vendor is misisng, and not find by fallback-->
+ <description>D_DEF_CS</description>
+ <offline/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="LocalisedInformationElement.jar"/>
+ </resources>
+ <application-desc main-class="LocalisedInformationElement">
+ </application-desc>
+</jnlp>
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/resources/LocalisedInformationElement_noLoc.jnlp Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,53 @@
+<!--
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+
+ -->
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="1.0" href="LocalisedInformationElement_noLoc.jnlp" codebase=".">
+ <information>
+ <title>localisedJnlp_noLoc.jnlp1</title>
+ <vendor>IcedTea</vendor>
+ <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/>
+ <description>LocalisedInformationElement_noLoc.jnlp</description>
+ <offline/>
+ </information>
+ <resources>
+ <j2se version="1.4+"/>
+ <jar href="LocalisedInformationElement.jar"/>
+ </resources>
+ <application-desc main-class="LocalisedInformationElement">
+ </application-desc>
+</jnlp>
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/srcs/LocalisedInformationElement.java Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,52 @@
+/* LocalisedInformationElement.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation, version 2.
+
+IcedTea is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+ */
+
+import java.util.Locale;
+
+public class LocalisedInformationElement{
+
+ public static void main(String[] args){
+ System.out.println("LocalisedInformationElement launched");
+ System.out.println("*******************");
+// This needs signed code
+// String locale = System.getProperty("user.language");
+// System.out.println("value of user.language: "+locale);
+ Locale loc=Locale.getDefault();
+ System.out.println("default locale: "+loc.toString());
+ System.out.println("*******************");
+ }
+}
diff -r 57b5ee44e502 -r ccadc46c4caa tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/reproducers/simple/LocalisedInformationElement/testcases/LocalisedInformationElementTest.java Mon Aug 13 12:49:02 2012 +0200
@@ -0,0 +1,356 @@
+/* LocalisedInformationElementTest.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation, version 2.
+
+IcedTea is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version.
+ */
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import net.sourceforge.jnlp.ProcessResult;
+import net.sourceforge.jnlp.ServerAccess;
+import net.sourceforge.jnlp.annotations.Bug;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class LocalisedInformationElementTest {
+
+ private static ServerAccess server = new ServerAccess();
+
+ /**
+ * this will prepare new set of varibales with wanted locale, which
+ * can be then passed to subprocess
+ * @param locale - locale to be set to LANG variable, eg cs_CZ.UTF-8
+ */
More information about the distro-pkg-dev
mailing list