windows friendly ProjectUtilTest

This commit is contained in:
Vladimir Krivosheev
2017-05-15 14:50:23 +02:00
parent dce3de0ef5
commit b98828c8b0
@@ -18,11 +18,13 @@ package com.intellij.openapi.project
import com.intellij.openapi.application.appSystemDir
import com.intellij.testFramework.PlatformTestCase
import com.intellij.testFramework.assertions.Assertions.assertThat
import java.io.File
class ProjectUtilTest : PlatformTestCase() {
fun testDoNotUseNameAsHashPrefixForIpr() {
val cachePath = appSystemDir.relativize(project.getProjectCachePath("foo")).toString()
// remove location hash suffix because it is not constant value (depends on machine)
assertThat(cachePath.substring(0, cachePath.lastIndexOf('.')))
.isEqualTo("foo/testdonotusenameashashprefixforipr")
.isEqualTo("foo${File.separatorChar}testdonotusenameashashprefixforipr")
}
}