From 290a919265c323e7148030e193420696e5451646 Mon Sep 17 00:00:00 2001 From: Vyacheslav Rusakov Date: Tue, 26 Sep 2023 14:30:46 +0700 Subject: [PATCH] fix test for linux --- .../ru/vyarus/gradle/frontend/util/FileUtilsTest.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/groovy/ru/vyarus/gradle/frontend/util/FileUtilsTest.groovy b/src/test/groovy/ru/vyarus/gradle/frontend/util/FileUtilsTest.groovy index 1cc0d34..7e06a0c 100644 --- a/src/test/groovy/ru/vyarus/gradle/frontend/util/FileUtilsTest.groovy +++ b/src/test/groovy/ru/vyarus/gradle/frontend/util/FileUtilsTest.groovy @@ -78,7 +78,11 @@ class FileUtilsTest extends AbstractTest { FileUtils.relative(testProjectDir, file('js.js')) == 'js.js' FileUtils.relative(file('index.html'), file('sub/js.js')) == 'sub/js.js' FileUtils.relative(file('sub/index.html'), file('js.js')) == '../js.js' - FileUtils.relative(file('sub\\index.html'), file('js.js')) == '../js.js' + + if (isWin) { + // on linux it would be single file name + FileUtils.relative(file('sub\\index.html'), file('js.js')) == '../js.js' + } } def "Check file read-write"() {