-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsystemTests.gradle
More file actions
58 lines (37 loc) · 1.37 KB
/
Copy pathsystemTests.gradle
File metadata and controls
58 lines (37 loc) · 1.37 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//////////////// test hello-world project //////////////////////
task helloWorldTest(type: Exec) {
workingDir 'exemples/hello-world'
commandLine './gradlew'
args '-q', 'clean', 'run'
standardOutput = new ByteArrayOutputStream()
}
helloWorldTest << {
assert standardOutput.toString().contains('Hello, world!\n')
}
//////////////// test hello-world-with-libray project //////////////////////
task installHelloLibrary(type: Exec) {
workingDir 'exemples/hello-world-with-libraries/hello-library/'
commandLine './gradlew'
args '-q', 'clean', 'install'
}
task runHelloMain(type: Exec, dependsOn: installHelloLibrary) {
workingDir 'exemples/hello-world-with-libraries/hello-main/'
commandLine './gradlew'
args '-q', 'clean', 'run'
standardOutput = new ByteArrayOutputStream()
}
runHelloMain << {
assert standardOutput.toString().contains('Hello, world!\n')
}
task helloWordWithDependenciesTest(dependsOn: runHelloMain)
//////////////// test hello-world-multi-modules project //////////////////////
task helloWorldMulitModulesTest(type: Exec) {
workingDir 'exemples/hello-world-multi-modules'
commandLine './gradlew'
args '-q', 'clean', 'run'
standardOutput = new ByteArrayOutputStream()
}
helloWorldMulitModulesTest << {
println standardOutput.toString()
assert standardOutput.toString().contains('Hello, world!\n')
}