mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
[FIXED HUDSON-2813] Applied a change with a bit of modifications. This will be 1.279
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14777 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
684e94ca55
commit
395adfffc3
6 files changed
+183
-15
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package hudson.matrix;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @author Kohsuke Kawaguchi
|
||||
*/
|
||||
public class CombinationTest extends TestCase {
|
||||
@SuppressWarnings({"RedundantStringConstructorCall"})
|
||||
public void testEval() {
|
||||
Map<String,String> r = new HashMap<String, String>();
|
||||
r.put("a","X");
|
||||
r.put("b",new String("Y")); // make sure this 'Y' is not the same object as literal "Y".
|
||||
Combination c = new Combination(r);
|
||||
assertTrue(c.evalGroovyExpression(null));
|
||||
assertTrue(c.evalGroovyExpression(" "));
|
||||
assertTrue(c.evalGroovyExpression("true"));
|
||||
assertTrue(c.evalGroovyExpression("a=='X'"));
|
||||
assertTrue(c.evalGroovyExpression("b=='Y'"));
|
||||
assertTrue(c.evalGroovyExpression("(a=='something').implies(b=='other')"));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user