incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske" <harry.met...@gmail.com>
Subject Re: Unit test WikiEngineTest.testSpacedNames1 fails on case-sensitive operating systems
Date Thu, 04 Sep 2008 16:44:17 GMT
I would think that JSPWiki should consider the case, but I'm not sure (I
only run it on *nix type systems).
If that's the case, I would suggest to remove the two last tests.

Harry

2008/9/4 Simon Kitching <sk@ops.co.at>

> I've run the jspwiki 2.6.3 unit tests on linux, and test
>  WikiEngineTest.testSpacedNames1
> fails.
>
> The test is simple:
>
>   public void testSpacedNames1()
>       throws Exception
>   {
>       m_engine.saveText("This is a test", "puppaa");
>             assertEquals( "normal", "puppaa", m_engine.getText("This is a
> test").trim() );
>       assertEquals( "lowercase", "puppaa", m_engine.getText("this is a
> test").trim() );
>       assertEquals( "randomcase", "puppaa", m_engine.getText("ThiS Is a
> teSt").trim() );
>   }
>
>
> And the failure reason is simple too. The saveText call succeeds, and
> creates an on-disk file
>  /tmp/testrepository/This+is+a+test.txt
> containing the provided content.
>
> The first assert works fine.
>
> The second assert fails, because it looks for a file named
>  /tmp/testrepository/this+is+a+test.txt
> which is of course not found on case-sensitive operating systems. The
> getText call then returns an empty string.
>
> Is jspwiki supposed to support pageName lookups that vary by case (ie the
> test is right, and jspwiki has a bug), or are pageNames expected to be
> case-sensitive on case-sensitive systems (ie the unit test case has a bug)?
>
> Thanks,
> Simon
>
>


-- 
met vriendelijke groet,
Harry Metske
Telnr. +31-548-512395
Mobile +31-6-51898081

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message