From 5961a9fea570e2683ccca57de5ee67ea9e94a68f Mon Sep 17 00:00:00 2001 From: Maxim Shafirov Date: Thu, 25 Sep 2014 15:15:30 +0400 Subject: [PATCH] Support windows file separators (and share tests) --- .idea/runConfigurations/SwotTest.xml | 30 ++++++++++++++++++++++++++++ src/swot/Compiler.kt | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .idea/runConfigurations/SwotTest.xml diff --git a/.idea/runConfigurations/SwotTest.xml b/.idea/runConfigurations/SwotTest.xml new file mode 100644 index 0000000000..fd1b85e7f3 --- /dev/null +++ b/.idea/runConfigurations/SwotTest.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/swot/Compiler.kt b/src/swot/Compiler.kt index 4e38a15b1d..978b8083b1 100644 --- a/src/swot/Compiler.kt +++ b/src/swot/Compiler.kt @@ -15,7 +15,7 @@ fun main(args: Array) { val root = File("lib/domains") root.recurse { if (it.isFile()) { - val parts = root.relativePath(it).trimTrailing(".txt").split('/').toList() + val parts = root.relativePath(it).replace('\\', '/').trimTrailing(".txt").split('/').toList() if (!checkSet(CompilationState.blacklist, parts) && !checkSet(CompilationState.domains, parts)) { CompilationState.domains.add(parts.reverse().join(".")) }