Skip to content

Commit e23d3e0

Browse files
Merge pull request #956 from akarnokd/StringObservableTestFix
Fixed byLine test to use line.separator system property instead of \n.
2 parents 5c3e416 + 271eda4 commit e23d3e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rxjava-contrib/rxjava-string/src/test/java/rx/observables/StringObservableTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ public void testFromReader() {
247247

248248
@Test
249249
public void testByLine() {
250-
List<Line> lines = StringObservable.byLine(Observable.from(Arrays.asList("qwer", "\nasdf\n", "zx", "cv"))).toList().toBlockingObservable().single();
250+
String newLine = System.getProperty("line.separator");
251+
252+
List<Line> lines = StringObservable.byLine(Observable.from(Arrays.asList("qwer", newLine + "asdf" + newLine, "zx", "cv"))).toList().toBlockingObservable().single();
251253

252254
assertEquals(Arrays.asList(new Line(0, "qwer"), new Line(1, "asdf"), new Line(2, "zxcv")), lines);
253255
}

0 commit comments

Comments
 (0)