ping? [RFC] [icedtea-web] reproducer for handling spaces

Omair Majid omajid at redhat.com
Thu Nov 10 07:17:57 PST 2011


On 11/08/2011 02:45 AM, Jiri Vanek wrote:
> On 11/04/2011 03:31 PM, Omair Majid wrote:
>> On 11/03/2011 04:44 PM, Jiri Vanek wrote:
> ....
>>
>>>>> Because it is so easy to run single reproducer from IDE, then i
>>>>> believe
>>>>> that the only problem to run it from commandline is correct setting of
>>>>> classpath.
>>>>>>
>>>>>> As for restoring IFS, you can do simple assignments in the
>>>>>> makefile to
>>>>>> restore IFS:
>>>>>
>>>>> Actually, you can't. I do not know why, but inside mkefile, the IFS
>>>>> variable is different from shell (just space in my case, whether in
>>>>> shell contains space,\t and \n). If I'm changing it in "shell", then I
>>>>> prefer to restore it by the same way. The line you wrote, was my
>>>>> exactly
>>>>> first idea:)
>>>>>
>>>>
>>>> Well if IFS has a different value when running under make, how is that
>>>> a problem? As long as you set it back to the old IFS, I would expect
>>>> things to work fine.
>>>
>>> Ok. Unless it cause some catastrophe I will do this as you suggested.
>>>
>>
>> Please let us know how it goes.
>
> It seems it is working as you expected.
> The only change is assignment IFS="$$IFS_BACKUP" ; \ instead of
> restoreIFS() function ( which I still like more ;) )
>

> diff -r 89b7a28ccafb tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java
> --- a/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java	Mon Oct 31 16:31:41 2011 -0400
> +++ b/tests/netx/jnlp_testsengine/net/sourceforge/jnlp/ResourcesTest.java	Tue Nov 08 08:36:59 2011 +0100

> @@ -64,9 +64,12 @@
>
>           for (int i = 0; i<  simpleContent.length; i++) {
>               File file = simpleContent[i];
> -            System.err.println(file.getName());
> +            System.err.print(file.getName());
> +            URI u = new URI((String)null,(String)null,(String)null,server.getPort(),file.getName(),(String)null,null);

It seems rather strange that the URI has the server port, but not the 
server address. Not sure if this may or may not be a problem.

> +            System.err.println(" ("+u.toString()+")");
> +            String fname=u.toString();
>               if (file.getName().toLowerCase().endsWith(".jnlp")) {
> -                String c = server.getResourceAsString("/" + file.getName());
> +                String c = server.getResourceAsString("/" + fname);
>                   Assert.assertTrue(c.contains("<"));
>                   Assert.assertTrue(c.contains(">"));
>                   Assert.assertTrue(c.contains("jnlp"));

Everything else looks fine to me.

Cheers,
Omair



More information about the distro-pkg-dev mailing list