Skip to content
Permalink
Browse files

[JENKINS-33468] Enable closure implicit parameter test

  • Loading branch information
abayer committed Aug 11, 2017
1 parent ea5ce36 commit 88607f7a4be280e65a7cd79c10c2d38474d437db
@@ -47,7 +47,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>groovy-sandbox</artifactId>
<version>1.13</version>
<version>1.14-20170811.175223-2</version> <!-- TODO: Switch to release once https://github.com/jenkinsci/groovy-sandbox/pull/38 is merged and released -->
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
@@ -344,9 +344,7 @@ public String rawProp5() {
assertRejected(new ProxyWhitelist(), "staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods toInteger java.lang.String", "'123'.toInteger();");
assertEvaluate(new GenericWhitelist(), 123, "'123'.toInteger();");
assertEvaluate(new GenericWhitelist(), Arrays.asList(1, 4, 9), "([1, 2, 3] as int[]).collect({x -> x * x})");
/* TODO JENKINS-33468 No such property: it for class: groovy.lang.Binding:
assertEvaluate(new GenericWhitelist(), Arrays.asList(1, 4, 9), "([1, 2, 3] as int[]).collect({it * it})");
*/
// cover others from DgmConverter:
assertEvaluate(new GenericWhitelist(), "1970", "new Date(0).format('yyyy', TimeZone.getTimeZone('GMT'))");
assertEvaluate(new GenericWhitelist(), /* actual value sensitive to local TZ */ DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date(0)), "new Date(0).dateTimeString");

0 comments on commit 88607f7

Please sign in to comment.
You can’t perform that action at this time.