-
1. Re: URLNavigator Tests
julien1 May 11, 2007 10:02 AM (in response to mwringe)for point 1/ : yes it is a must to have
normally the implementation should deal with it as it simulates missing stuff using a stack
for point 2/ : what would be the behavior ? follow the link or skip it ? -
2. Re: URLNavigator Tests
mwringe May 11, 2007 10:16 AM (in response to mwringe)"julien@jboss.com" wrote:
for point 2/ : what would be the behavior ? follow the link or skip it ?
If we follow the links we could get into an infinite loop situation. For example
/a1/
/a1/b1 -> /a1/ [b1 links back to a1]
The other issue is how can this test be integrated into the testsuite? I don't believe Windows has the concept of links (although I could be wrong)
I also think I need to look a bit more into how java handles symlinks. -
3. Re: URLNavigator Tests
julien1 May 11, 2007 10:25 AM (in response to mwringe)Ok, probably that it is hard to unit test because it depends on the target environment.
-
4. Re: URLNavigator Tests
prabhat.jha May 11, 2007 11:02 AM (in response to mwringe)Cant we make this symlink test run only when OS is non-windows? I found this http://shell-shocked.org/article.php?id=284 for symlink in windows but it does not seem cool.
-
5. Re: URLNavigator Tests
mwringe Jun 12, 2007 9:41 PM (in response to mwringe)Sorry, I have actually had this done for a while and should have spoke up before now.
I made a couple of changes to the code outside of the testcase. I implemented the option to filter on file name (he option was there before but it just didn't do anything).
I also added the option to visit the root of a jar now. In order to do this, I had to add a fake jar entry, '/', since this doesn't actually exist in the jar. This causes the current jar entry test to fail. Since this entry doesn't actually exist, is it ok to add it? -
6. Re: URLNavigator Tests
julien1 Jun 13, 2007 8:52 AM (in response to mwringe)"mwringe" wrote:
I implemented the option to filter on file name (he option was there before but it just didn't do anything).
Good."mwringe" wrote:
I also added the option to visit the root of a jar now. In order to do this, I had to add a fake jar entry, '/', since this doesn't actually exist in the jar. This causes the current jar entry test to fail. Since this entry doesn't actually exist, is it ok to add it?
I don't understand, can you explain more precisely ? -
7. Re: URLNavigator Tests
mwringe Jun 13, 2007 11:00 AM (in response to mwringe)The root of a jar, '/', doesn't actually exist as an entry in the jar. I added a "/" atom object in the jarentryinfo class. So now when you go to navigate the jar using the jarentryinfo class, the root element appears to exist. This allows for visiting a jar starting at the root.
The jar entry test would have to be updated since it doesn't expect the root element to be there. -
8. Re: URLNavigator Tests
julien1 Jun 13, 2007 11:55 AM (in response to mwringe)the sequence of generated events that is expected by the tests has to take in account now the presence of "/" entry.
it looks normal to me.
I think you can go ahead and commit your changes