Angle brackets in ASTs are eaten in testing language, because the runtime considers them HTML.

A workaround (fix?) is to add this to the testing language plugin:


strategies

override write-to-string =
proceed;
string-replace(|“&”, “&”);
string-replace(|“<”, “<”);
string-replace(|“>”, “>”)

Spoofax version: 1.0.2.0-r24194

Submitted by Tobi Vollebregt on 8 February 2012 at 12:55

On 8 February 2012 at 12:56 Tobi Vollebregt tagged testing

On 8 February 2012 at 14:00 ServicePuntEWI commented:

A global override of write-to-string that affects all tested code might not be the best solution. Maybe we need a little wrapper function write-to-html-string in the testing language instead? :)


On 8 February 2012 at 14:48 Tobi Vollebregt commented:

On 8 Feb ServicePuntEWI wrote:

So who’s disguising as ServicePuntEWI? :-)

Maybe we need a little wrapper function write-to-html-string in the testing language instead?

Indeed. Also, just changing write-to-string does not appear to cover all cases (I think if the output is already a string angle brackets may slip through).


On 8 February 2012 at 15:19 Lennart Kats commented:

If you have a fix or a partial fix, please commit it. (And ServicePuntEWI is being really helpful but they should really be fixing the coffee room.)


On 8 February 2012 at 17:12 Tobi Vollebregt commented:

Committed partial fix in r24269.

Log in to post comments