From e2a13da325c976513a6709b8aeaf2a80613058b5 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Mon, 4 Mar 2013 18:43:30 +0400 Subject: [PATCH] Disabled part of IoTest.listFiles on Windows. --- libraries/stdlib/test/IoTest.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/stdlib/test/IoTest.kt b/libraries/stdlib/test/IoTest.kt index f85616c6221..1268cc9e375 100644 --- a/libraries/stdlib/test/IoTest.kt +++ b/libraries/stdlib/test/IoTest.kt @@ -129,10 +129,12 @@ class IoTest(){ assertEquals(5, totalFiles) - subdir.setReadable(false) + if (subdir.setReadable(false)) { + // On Windows, we can't make directory not readable, and setReadable() will return false - var totalFilesWithUnReadableDir = 0 - dir.recurse { totalFilesWithUnReadableDir++ } - assertEquals(4, totalFilesWithUnReadableDir) + var totalFilesWithUnReadableDir = 0 + dir.recurse { totalFilesWithUnReadableDir++ } + assertEquals(4, totalFilesWithUnReadableDir) + } } }