File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
modules/docs-tests/src/test/scala/sclicheck Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,20 @@ class DocTests extends munit.FunSuite {
10
10
11
11
val options : Options = Options (scalaCliCommand = Seq (TestUtil .scalaCliPath))
12
12
13
- private def containsCheck (f : os.Path ): Boolean =
14
- os.read.lines(f)
15
- .exists(line => line.startsWith(" ```md" ) || line.startsWith(" ```bash" ))
13
+ private def lineContainsAnyChecks (l : String ): Boolean =
14
+ l.startsWith(" ```md" ) || l.startsWith(" ```bash" ) ||
15
+ l.startsWith(" ```scala compile" ) || l.startsWith(" ```scala fail" ) ||
16
+ l.startsWith(" ````markdown compile" ) || l.startsWith(" ````markdown fail" ) ||
17
+ l.startsWith(" ```java compile" ) || l.startsWith(" ````java fail" )
18
+ private def fileContainsAnyChecks (f : os.Path ): Boolean =
19
+ os.read.lines(f).exists(lineContainsAnyChecks)
16
20
17
21
for {
18
22
(tpe, dir) <- dirs
19
23
inputs = os.walk(dir)
20
24
.filter(_.last.endsWith(" .md" ))
21
25
.filter(os.isFile(_))
22
- .filter(containsCheck )
26
+ .filter(fileContainsAnyChecks )
23
27
.map(_.relativeTo(dir))
24
28
.sortBy(_.toString)
25
29
md <- inputs
You can’t perform that action at this time.
0 commit comments