소스 검색

Fix newline unit test error on Linux.

BDisp 9 달 전
부모
커밋
22cf92da85
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      UnitTests/Views/TextViewTests.cs

+ 8 - 1
UnitTests/Views/TextViewTests.cs

@@ -4722,7 +4722,14 @@ This is the second line.
         tv.SelectionStartColumn = 12;
         tv.CursorPosition = new Point (18, 1);
 
-        Assert.Equal (31, tv.SelectedLength);
+        if (Environment.NewLine.Length == 2)
+        {
+            Assert.Equal (31, tv.SelectedLength);
+        }
+        else
+        {
+            Assert.Equal (30, tv.SelectedLength);
+        }
         Assert.Equal ($"first line.{Environment.NewLine}This is the second", tv.SelectedText);
         Assert.Equal ($"first line.{Environment.NewLine}This is the second", Cell.ToString (tv.SelectedCellsList));
         Assert.Equal (new Point (18, 1), tv.CursorPosition);