Skip to content

Commit

Permalink
[JENKINS-33468] Enable closure implicit parameter test
Browse files Browse the repository at this point in the history
  • Loading branch information
abayer committed Aug 11, 2017
1 parent ea5ce36 commit 88607f7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -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>
Expand Down
Expand Up @@ -344,9 +344,7 @@ public static final class Special {
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");
Expand Down

0 comments on commit 88607f7

Please sign in to comment.