From 2f20db7f44b63bc92f56fa8e8d473c954d359273 Mon Sep 17 00:00:00 2001 From: "Kirill.Likhodedov" Date: Fri, 12 Oct 2012 13:23:45 +0400 Subject: [PATCH] GitBranchWorkerTest: use system line separators when comparing text --- .../git4idea/branch/GitBranchWorkerTest.groovy | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy index 43497f755090..daf3d5854843 100644 --- a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy +++ b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy @@ -21,6 +21,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.util.Disposer import com.intellij.openapi.util.io.FileUtil +import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vcs.FilePathImpl import com.intellij.openapi.vcs.changes.Change import com.intellij.openapi.vcs.changes.CurrentContentRevision @@ -349,13 +350,13 @@ class GitBranchWorkerTest { assertCurrentBranch("feature"); cd myUltimate def actual = cat(localChanges[0]) - assertEquals("Content doesn't match", -"""line with branch changes + def expectedContent = """line with branch changes common content common content common content line with master changes -""", actual) +""" + assertEquals("Content doesn't match", StringUtil.convertLineSeparators(expectedContent, File.separator), actual) } @Test @@ -365,13 +366,13 @@ line with master changes cd myUltimate def actual = cat(localChanges[0]) - assertEquals("Content doesn't match", -"""line with branch changes + def expectedContent = """line with branch changes common content common content common content line with master changes -""", actual) +""" + assertEquals("Content doesn't match", StringUtil.convertLineSeparators(expectedContent, File.separator), actual) } Collection agree_to_smart_operation(String operation, String expectedSuccessMessage) {