@@ -0,0 +1,2059 @@
+package reflex;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport org.antlr.runtime.RecognitionException;%0Aimport org.apache.log4j.Logger;%0Aimport org.junit.Test;%0A%0Apublic class MatchesTest extends AbstractReflexScriptTest %7B%0A%09private static Logger log = Logger.getLogger(MatchesTest.class);%0A%0A    // @Test%0A    // public void happyPathMatch() throws RecognitionException %7B%0A    // Map%3CString, Object%3E map = new HashMap%3C%3E();%0A    // map.put(%22a%22, %22Monday%22);%0A    // map.put(%22b%22, %22.*day%22);%0A    // String output = runTestForWithApi(%22/matches.rfx%22, map);%0A    // assertEquals(%22true%22, output.trim());%0A    // %7D%0A%0A    @Test%0A    public void happyPathMatch() throws RecognitionException %7B%0A%0A        // Pattern p = Pattern.compile(%22(.*)day%22);%0A        // Matcher m = p.matcher(%22Monday%22);%0A        // while (m.find()) %7B%0A        // int i = m.groupCount();%0A        // if (i == 0) System.out.println(m.group());%0A        // else %7B%0A        // for (int group = 0; group %3C= m.groupCount(); group++) %7B%0A        // System.out.println(m.group(group));%0A        // %7D%0A        // %7D%0A        // %7D%0A        //%0A        // m = p.matcher(%22wibble%22);%0A        // while (m.find()) %7B%0A        // for (int group = 0; group %3C m.groupCount(); group++) %7B%0A        // System.out.println(m.group(group));%0A        // %7D%0A        // %7D%0A%0A        assertEquals(%22%5BMonday%5D%22, runScript(%22foo = matches(%5C%22Monday%5C%22, %5C%22.*day%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A        assertEquals(%22%5BMon%5D%22, runScript(%22foo = matches(%5C%22Monday%5C%22, %5C%22(.*)day%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A        assertEquals(%22%5BMon, day%5D%22, runScript(%22foo = matches(%5C%22Monday%5C%22, %5C%22(.*)(day)%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A        assertEquals(%22%5Bday%5D%22, runScript(%22foo = matches(%5C%22Monday%5C%22, %5C%22.*(day)%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A        assertEquals(%22%5B%5D%22, runScript(%22foo = matches(%5C%22March%5C%22, %5C%22.*day%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A        assertEquals(%22%5BMon, y%5D%22, runScript(%22foo = matches(%5C%22Monday%5C%22, %5C%22(.*)da(y)%5C%22);%5Cnprintln(foo);%5Cnreturn foo;%5Cn%22, null).trim());%0A    %7D%0A%0A%7D

Add test case