slocumbf / owasp-esapi-java

Automatically exported from code.google.com/p/owasp-esapi-java
0 stars 0 forks source link

CodecTest failures #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.checkout source
2.mvn -Dtest=CodecTest test

What is the expected output? What do you see instead?
CodecTests should pass
All 4 CodecTests fail

What version of the product are you using? On what operating system?
trunk revision 701
x86_64-unknown-linux-gnu/Debian Sid/Sun hotspot 1.6.0

Please provide any additional information below.

All of these tests were failing testing the Oracle codec. They were testing
back slash escaping in the same way that the mysql "Standard" tests were.
From what I can tell from the Oracle codec, the oracle documentation that
it points to and the like, this type of escaping is not supported by
oracle. Instead it uses the doubled single quote to escape a single quote.
This is the same way that the mysql "ANSI" version does so I'm guessing
that the "Standard" mysql got copied to test oracle instead of the "ANSI"
causing the issue.

Attached is a patch that changes the oracle tests to test for oracle
escaping behavior. 

This patch also breaks out the different tests into separate tests. This is
in accordance with my understanding of unit test best practice of just
testing one thing at a time. It also allows other codecs to be tested even
when earlier ones fail (the unix and windows codecs were never tested
because the oracle ones failed). Additionally this makes it clear that just
the oracle codec is failing and not the entire codec subsystem.

Original issue reported on code.google.com by schal...@darkmist.net on 20 Oct 2009 at 7:42

Attachments:

GoogleCodeExporter commented 9 years ago
Patch applied in revision 752.

Original comment by schal...@darkmist.net on 4 Nov 2009 at 8:30