Skip to content
This repository

Test Failures #39

Closed
ghillert opened this Issue · 1 comment

3 participants

Gunnar Hillert senendds Scott Murphy
Gunnar Hillert

When building SM3, I see 5 test failures:

Failed tests: 
  testBody(org.sitemesh.html.DataDrivenSuiteBuilder$AssertTrimmedTest): null expected:<[]> but was:<[<html>

</html>]>
  testBody(org.sitemesh.html.DataDrivenSuiteBuilder$AssertTrimmedTest): null expected:<[]> but was:<[<html>

</html>]>
  testBody(org.sitemesh.html.DataDrivenSuiteBuilder$AssertTrimmedTest): null expected:<[]> but was:<[<html>

</html>]>
  testBody(org.sitemesh.html.DataDrivenSuiteBuilder$AssertTrimmedTest): null expected:<[]> but was:<[<html>

</html>]>
  testBody(org.sitemesh.html.DataDrivenSuiteBuilder$AssertTrimmedTest): null expected:<[]> but was:<[<HTML>

</HTML>]>

Tests run: 700, Failures: 5, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] SiteMesh parent POM ............................... SUCCESS [0.620s]
[INFO] SiteMesh library .................................. FAILURE [8.155s]
[INFO] SiteMesh example: Hello world web-app ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.965s
[INFO] Finished at: Fri Oct 12 01:17:02 EDT 2012
[INFO] Final Memory: 10M/81M
[INFO] ------------------------------------------------------------------------
senendds

I've just debugged the tests myself, as I get the same failures as you did, and the Sm2HtmlContentProcessorTest fails while processing files test25.txt, test29.txt, test30.txt, test32.txt and test44.txt in org.sitemesh.html.testdata.

All those files lack of the BODY tag, so the test expects the extracted "body" property to be empty. The problem is that it is not, because the CoreHtmlTagRuleBundle, in the cleanUp procedure, sets the "body" property to whatever remains unprocessed in the buffer ("<html> </html>" in all these cases) if it is empty.

I'm not sure if that is the right thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.