Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
java: 11
distribution: temurin
jobtype: 2
- os: windows-latest
- os: windows-2025
java: 8
distribution: zulu
jobtype: 3
Expand Down
43 changes: 18 additions & 25 deletions io/src/test/scala/sbt/internal/io/SourceModificationWatchSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,21 +97,16 @@ private[sbt] trait EventMonitorSpec { self: AnyFlatSpec & Matchers =>

it should "ignore creation of files that are explicitly ignored" in IO
.withTemporaryDirectory { dir =>
// TODO https://github.com/sbt/io/issues/434
if (scala.util.Properties.isWin) {
pending
} else {
val parentDir = dir / "src" / "watchme"
val created = parentDir / ".hidden.scala"
val notIgnored = parentDir / "foo.scala"
val parentDir = dir / "src" / "watchme"
val created = parentDir / ".hidden.scala"
val notIgnored = parentDir / "foo.scala"

IO.createDirectory(parentDir)
IO.createDirectory(parentDir)

assert(watchTest(parentDir, AllPass, excludes(created.toPath)) {
randomTouch(created)
randomTouch(notIgnored)
})
}
assert(watchTest(parentDir, AllPass, excludes(created.toPath)) {
randomTouch(created)
randomTouch(notIgnored)
})
}

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

it should "ignore deletion of files not included in inclusion filter" in IO
.withTemporaryDirectory { dir =>
// TODO https://github.com/sbt/io/issues/434
if (scala.util.Properties.isWin) {
pending
} else {
val parentDir = dir / "src" / "watchme"
val file = parentDir / "inme"
IO.write(file, "foo")
val source = parentDir / "foo.scala"

assert(watchTest(parentDir, AllPass, excludes(file.toPath)) {
IO.delete(file)
randomTouch(source)
})
pending // TODO
}
val parentDir = dir / "src" / "watchme"
val file = parentDir / "inme"
IO.write(file, "foo")
val source = parentDir / "foo.scala"

assert(watchTest(parentDir, AllPass, excludes(file.toPath)) {
IO.delete(file)
randomTouch(source)
})
}

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