Skip to content

Commit

Permalink
Merge pull request #480 from hans-d/fix_win_eol
Browse files Browse the repository at this point in the history
Fix win eol - part 2
  • Loading branch information
nateabele committed May 24, 2012
2 parents 0816a2b + 24cc20b commit 0697150
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/cases/g11n/catalog/adapter/CodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,22 @@ public function testReadMessageTemplateTNoEscaping() {
$expected = 'escaping\r\n3';
$result = $results['escaping\r\n3']['ids']['singular'];
$this->assertEqual($expected, $result);
}

$expected = "escaping\n\t4";
$result = $results["escaping\n\t4"]['ids']['singular'];
$this->assertEqual($expected, $result);
/**
* Due to different EOL handling on linux and windows, combined with
* the git config core.autocrlf setting, the test file may be written
* with either LF or CRLF as line endings, which has an effect on the
* key where the data is stored.
*/
public function testReadMessageTemplateTNoEscapingLineEnding() {
$results = $this->adapter->read('messageTemplate', 'root', null);

$expectedLR = "escaping\n\t4";
$expectedCRLF = "escaping\r\n\t4";
$resultLR = $results["escaping\n\t4"]['ids']['singular'];
$resultCRLF = $results["escaping\r\n\t4"]['ids']['singular'];
$this->assertTrue($expectedLR === $resultLR || $expectedCRLF === $resultCRLF);
}

public function testReadMessageTemplateTnSimple() {
Expand Down

0 comments on commit 0697150

Please sign in to comment.