notishell / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

smali LexerTest fails always on Windows #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the latest version from GIT (8ca89226fa266b4ae5017ed5200175db507b9c83) I 
execute mvn assembly:assembly in the smali subdirectory.

The first test "LexerTest" always fails because it expects "\n" but gets "\r\n" 
on Windows. Therefore this test will always fail on Windows.

To make the test platform independent it should be compared to the platform 
independent value System.getProperty("line.separator")

I extended the assert fail text to make it clear - the text in square brackets 
are the Strings in the form java.util.Arrays.toString(..) prints.

-------------------------------------------------------------------------------
Test set: LexerTest
-------------------------------------------------------------------------------
Tests run: 14, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.328 sec <<< 
FAILURE!
CommentTest(LexerTest)  Time elapsed: 0.005 sec  <<< FAILURE!
java.lang.AssertionError: Invalid token text at index 1. Expecting text "
" [10], got "
" [13, 10]
    at org.junit.Assert.fail(Assert.java:92)
    at LexerTest.runTest(LexerTest.java:195)
    at LexerTest.CommentTest(LexerTest.java:101)

Original issue reported on code.google.com by jan.stot...@googlemail.com on 3 Feb 2012 at 1:13

GoogleCodeExporter commented 9 years ago
Thanks for the report! I'll get it fixed :)

Original comment by jesusfreke@jesusfreke.com on 4 Feb 2012 at 8:27

GoogleCodeExporter commented 9 years ago
I'm pretty sure this is fixed. Feel free to reopen if not.

Original comment by jesusfreke@jesusfreke.com on 14 Feb 2013 at 11:47