Add test on "rewrite" and if statements with regexps