Rock on Julien! If you'd like to make the test
case more robust, grab some arbitrary unicode
characters (symbols, Japanese, whatever!)
and add them to both the test case file and
the html file.
Cheers,
Jesse
On 6/9/06, Julien Henry <[EMAIL PROTECTED]> wrote:
>
> Hi Jesse,
>
> I agree that TestContext.toEncodedString is useless (it is only used by
> HttpUnitDialog and some core functions), but none of the test cases fail
> on my computer. Perhaps because of the french encoding that support
> extended ASCII.
>
> But I think I will remove toEncodedString from the API (there are
> already many API incompatibilties, and I think the next version of
> jWebUnit will be called 2.0). If somenone find a reason to keep
> toEncodedString... wait and see.
>
> ++
> Julien
>
> Jesse Wilson a écrit :
> > Hey Julien --
> >
> > I've created a test to demonstrate the problem. Please
> > add this to your default set of test cases and fix the
> > TestContext problem!
> >
> > 1.
> > jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/CharsetTest.java
> >
> > This is my test case. It will have different results when run on
> > different
> > machines due to the platform-specific use of String.getBytes() that it
> > tests. At least one test should fail on all platforms (the euro test).
> >
> > 2. jwebunit-commons-tests/src/main/resources/testcases/charset.html_utf-8
> > This is a text file encoded with UTF-8. When you edit this file,
> > make sure
> > to set the character set to UTF-8 to get the euro character to show
> > up. I
> > recommend JEdit, it's pretty smart with character sets. If you make
> > changes,
> > be very careful with the character set. Some editors will try to
> > change the
> > character set and corrupt the file.
> >
> > 3. To configure your test setup of Jetty to serve UTF-8 files, please
> > add the following lines to JettySetup.java, right after the line
> > with "new WebAppContext()":
> > MimeTypes mimeTypes = new MimeTypes();
> > mimeTypes.addMimeMapping("html_utf-8", "text/html;
> > charset=UTF-8");
> > wah.setMimeTypes(mimeTypes);
> > Since I've used the extension "html_utf-8" this won't conflict
> > with your other tests that will continue to run with no encoding
> > specified.
> >
> > Thanks,
> > Jesse
> >
> > PS - In case you're interested, I discussed this problem on my blog
> > last night and linked your project. http://publicobject.com/
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Jwebunit-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jwebunit-users
> >
>
> This message contains information that may be privileged or confidential and
> is the property of the Capgemini Group. It is intended only for the person to
> whom it is addressed. If you are not the intended recipient, you are not
> authorized to read, print, retain, copy, disseminate, distribute, or use
> this message or any part thereof. If you receive this message in error,
> please notify the sender immediately and delete all copies of this message.
>
>
>
> _______________________________________________
> Jwebunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users