[rules-dev] Bug mvel /* parsed incorrectly 5.3.0.CR1:d63c9c5efe49e

Mark Proctor mproctor at codehaus.org
Fri Feb 24 01:43:00 EST 2012


Sounds like a good test to add, here is how to submit it as a pull request:
http://www.athico.com/Getting_Involved/gettinginvolved.html

Mark

On 24/02/2012 05:33, Benjamin Bennett wrote:
>
>
> Just wanted to pass it on was trying to track down what was causing  
> parse error .
> Here is  test case . I tried to  bisect but couldn't get it to compile 
> on every revision. Most likely my set up .
>
> But here is test case that is broken sometime after  5.3.0.CR1 . 
> Please don't flame me if this is the wrong channel to send this too.
>
> public void testParseSlashStarInString() {
>
>         String str = "";
>         str += "package org.drools \n";
>         str += "import org.drools.Cheese \n";
>         str += "dialect \"mvel\"\n";
>         str += "rule rule1 \n";
>         str += "  when \n";
>         str += "    $c : Cheese() \n";
>         str += " \n";
>         str += "  then \n";
>         str += "    Cheese hold= new Cheese(\"/*\",5);\n";
>         str += "end\n";
>
>
>         final KnowledgeBuilder kbuilder = 
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>         
> kbuilder.add(ResourceFactory.newByteArrayResource(str.getBytes()), 
> ResourceType.DRL);
>         StringBuffer stringBuffer = new StringBuffer();
>         for (KnowledgeBuilderError e : kbuilder.getErrors()) {
>             stringBuffer.append(e.toString());
>         }
>         Assert.assertEquals(stringBuffer.toString(), 0, 
> kbuilder.getErrors().size());
> )
>
> -- 
> Sincerely,
>
> Benjamin Bennett
> 314.246.0645
> benbennett at gmail.com <mailto:benbennett at gmail.com>
>
> "For a successful technology, reality must take precedence over public 
> relations, for Nature cannot be fooled."
> Richard Feynman
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20120224/b0fa50cf/attachment-0001.html 


More information about the rules-dev mailing list