Skip to content

Commit f308717

Browse files
authored
Merge pull request #435 from eed3si9n/wip/pending
Mark tests pending
2 parents 89abbeb + a6366f3 commit f308717

File tree

1 file changed

+25
-18
lines changed

1 file changed

+25
-18
lines changed

io/src/test/scala/sbt/internal/io/SourceModificationWatchSpec.scala

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,21 @@ private[sbt] trait EventMonitorSpec { self: AnyFlatSpec & Matchers =>
9797

9898
it should "ignore creation of files that are explicitly ignored" in IO
9999
.withTemporaryDirectory { dir =>
100-
val parentDir = dir / "src" / "watchme"
101-
val created = parentDir / ".hidden.scala"
102-
val notIgnored = parentDir / "foo.scala"
100+
// TODO https://github.com/sbt/io/issues/434
101+
if (scala.util.Properties.isWin) {
102+
pending
103+
} else {
104+
val parentDir = dir / "src" / "watchme"
105+
val created = parentDir / ".hidden.scala"
106+
val notIgnored = parentDir / "foo.scala"
103107

104-
IO.createDirectory(parentDir)
108+
IO.createDirectory(parentDir)
105109

106-
assert(watchTest(parentDir, AllPass, excludes(created.toPath)) {
107-
randomTouch(created)
108-
randomTouch(notIgnored)
109-
})
110+
assert(watchTest(parentDir, AllPass, excludes(created.toPath)) {
111+
randomTouch(created)
112+
randomTouch(notIgnored)
113+
})
114+
}
110115
}
111116

112117
it should "ignore creation of an empty directory" in IO.withTemporaryDirectory { dir =>
@@ -191,18 +196,20 @@ private[sbt] trait EventMonitorSpec { self: AnyFlatSpec & Matchers =>
191196

192197
it should "ignore deletion of files not included in inclusion filter" in IO
193198
.withTemporaryDirectory { dir =>
199+
// TODO https://github.com/sbt/io/issues/434
194200
if (scala.util.Properties.isWin) {
195-
pending // TODO
201+
pending
202+
} else {
203+
val parentDir = dir / "src" / "watchme"
204+
val file = parentDir / "inme"
205+
IO.write(file, "foo")
206+
val source = parentDir / "foo.scala"
207+
208+
assert(watchTest(parentDir, AllPass, excludes(file.toPath)) {
209+
IO.delete(file)
210+
randomTouch(source)
211+
})
196212
}
197-
val parentDir = dir / "src" / "watchme"
198-
val file = parentDir / "inme"
199-
IO.write(file, "foo")
200-
val source = parentDir / "foo.scala"
201-
202-
assert(watchTest(parentDir, AllPass, excludes(file.toPath)) {
203-
IO.delete(file)
204-
randomTouch(source)
205-
})
206213
}
207214

208215
it should "ignore deletion of files explicitly ignored" in IO.withTemporaryDirectory { dir =>

0 commit comments

Comments
 (0)