File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
src/test/java/org/jenkinsci/plugins/workflow/cps Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 6868 <git-plugin .version>3.1.0</git-plugin .version>
6969 <workflow-support-plugin .version>2.17</workflow-support-plugin .version>
7070 <scm-api-plugin .version>2.0.8</scm-api-plugin .version>
71- <groovy-cps .version>1.23 </groovy-cps .version>
71+ <groovy-cps .version>1.24 </groovy-cps .version>
7272 <jenkins-test-harness .version>2.33</jenkins-test-harness .version>
7373 </properties >
7474 <dependencies >
9595 <dependency >
9696 <groupId >org.jenkins-ci.plugins</groupId >
9797 <artifactId >script-security</artifactId >
98- <version >1.39 </version >
98+ <version >1.42 </version >
9999 </dependency >
100100 <dependency >
101101 <groupId >org.jenkins-ci.plugins</groupId >
Original file line number Diff line number Diff line change @@ -465,4 +465,25 @@ public void multipleAssignmentFunctionCalledOnce() throws Exception {
465465 "assert a+b+c+d == 'firstsecondthirdfourth'\n " , true ));
466466 jenkins .buildAndAssertSuccess (job );
467467 }
468+
469+ @ Issue ("JENKINS-45982" )
470+ @ Test
471+ public void transformedSuperClass () throws Exception {
472+ WorkflowJob job = jenkins .jenkins .createProject (WorkflowJob .class , "p" );
473+ job .setDefinition (new CpsFlowDefinition ("class Foo {\n " +
474+ " public String other() {\n " +
475+ " return 'base'\n " +
476+ " }\n " +
477+ "}\n " +
478+ "class Bar extends Foo {\n " +
479+ " public String other() {\n " +
480+ " return 'y'+super.other()\n " +
481+ " }\n " +
482+ "}\n " +
483+ "String output = new Bar().other()\n " +
484+ "echo 'OUTPUT: ' + output\n " +
485+ "assert output == 'ybase'\n " , true ));
486+ WorkflowRun r = jenkins .buildAndAssertSuccess (job );
487+ jenkins .assertLogContains ("OUTPUT: ybase" , r );
488+ }
468489}
You can’t perform that action at this time.
0 commit comments