sbt/sbt-app/src/sbt-test/tests/setup-cleanup/changes/setup.sbt

17 lines
353 B
Plaintext
Raw Normal View History

2023-01-20 03:37:53 +01:00
Test / testOptions += {
val baseDir = baseDirectory.value
2023-01-20 03:37:53 +01:00
Tests.Setup { () =>
IO.touch(baseDir / "setup")
2023-01-20 03:37:53 +01:00
}
}
2023-01-20 03:37:53 +01:00
Test / testOptions += {
val t = baseDirectory.value / "tested"
val c = baseDirectory.value / "cleanup"
Tests.Cleanup { () =>
// assert(t.exists, "Didn't exist: " + t.getAbsolutePath)
IO.delete(t)
IO.touch(c)
2023-01-20 03:37:53 +01:00
}
}