blob: c9224ea3fefe38c275fe21a2216b71a63da5eedc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
package frege.gradle.tasks
import org.gradle.api.Project
import org.gradle.testfixtures.ProjectBuilder
import spock.lang.Specification
class FregeCompileTest extends Specification {
Project project = ProjectBuilder.builder().build()
FregeCompile compile
def setup() {
when:
compile = project.tasks.create("fregeCompile", FregeCompile)
}
def "configured sourcePaths tracked"() {
when:
compile.source("someFolder")
then:
compile.sourcePaths == [project.file("someFolder")]
}
def "default assembleArguments"() {
given:
compile.destinationDir = project.file("testoutput")
expect:
compile.assembleArguments() == ["-inline", "-make", "-d", project.file("testoutput").absolutePath]
}
def "with prefix"() {
given:
compile.destinationDir = project.file("testoutput")
compile.prefix = "somePrefix"
expect:
compile.assembleArguments() == ["-inline", "-make", "-prefix", "somePrefix", "-d", project.file("testoutput").absolutePath]
}
}
|