Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix win eol - part 2 #480

Merged
merged 2 commits into from

2 participants

@hans-d

fix EOL in g11n CodeTest

@nateabele
Owner

That assert should be $this->assertTrue($expected === $resultLR || $expected === $resultCRLF).

@nateabele nateabele merged commit 0697150 into UnionOfRAD:dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 23, 2012
  1. @hans-d

    fix EOL in g11n CodeTest

    hans-d authored
  2. @hans-d
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 3 deletions.
  1. +15 −3 tests/cases/g11n/catalog/adapter/CodeTest.php
View
18 tests/cases/g11n/catalog/adapter/CodeTest.php
@@ -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() {
Something went wrong with that request. Please try again.