Execute cliargs script before running tests
This commit is contained in:
parent
7413565d87
commit
be15297cc5
6 changed files with 29 additions and 17 deletions
|
@ -95,4 +95,15 @@ public class DetektOperationBuild extends Project {
|
|||
.ruleSets("config/pmd.xml")
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void test() throws Exception {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
super.test();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -61,11 +61,11 @@ class DetektOperationTest {
|
|||
|
||||
@Test
|
||||
void testCheckAllParameters() throws IOException {
|
||||
var params = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt"));
|
||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt"));
|
||||
|
||||
assertThat(params).isNotEmpty();
|
||||
assertThat(args).isNotEmpty();
|
||||
|
||||
var args = new DetektOperation()
|
||||
var params = new DetektOperation()
|
||||
.fromProject(new BaseProject())
|
||||
.allRules(true)
|
||||
.autoCorrect(true)
|
||||
|
@ -94,9 +94,9 @@ class DetektOperationTest {
|
|||
.report(new DetektReport(DetektReportId.HTML, "reports"))
|
||||
.executeConstructProcessCommandList();
|
||||
|
||||
for (var p : params) {
|
||||
for (var p : args) {
|
||||
var found = false;
|
||||
for (var a : args) {
|
||||
for (var a : params) {
|
||||
if (a.startsWith(p)) {
|
||||
found = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue