Fixes Issue #462 - failing tests on windows #465

wants to merge 7 commits into


None yet

2 participants

hans-d commented May 16, 2012

Developed on master, but also works on dev (checked locally).

When tests are run on a platform where git config core.autocrlf = true some tests are failing due to different end of line settings (crlf vs lf). Fixed these, and made these tests more conditional/environment aware.

Also fixes the test cleaning up on windows, where unlinking a readonly file was not working properly.

hans-d added some commits May 15, 2012
@hans-d hans-d fix failing tests/cases/console due to \n\n usage in autocrlf true
\n\n was compared with two hard returns in a string. Using git with autocrlf true (windows) this causes differences.
@hans-d hans-d fix permission denied on unlink
if file to unlink is readonly, it throws a exception (Permission denied) on Windows
solution: remove readonly flag and try again


note: this will still report an exception, but the test will be ok. Try/catch won't solve it
@hans-d hans-d fix failing tests/cases/g11n due to usage with autocrlf true
files are written, independant of the filesystem, with only \n
Testacses might contain extra \r in the compare tests
@hans-d hans-d Testing for EOL handling in tests
Depending on the platform and git config core.autocrlf setting.
Added _isEolCrLf() utility function to assist in those cases.
@hans-d hans-d Simplify EOL test issues fix.
command/create: re use the already existing <?php ?> replace
g11/catalog/adapter: make EOL replacement conditional
@hans-d hans-d Move inline comments to method documentation 70dd3a8
@hans-d hans-d Added comment that using PHP_EOL does not suffice. 38a996f

Closing this PR since we're splitting them up.

@nateabele nateabele closed this May 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment