generator: Add tests for updated string escaping routine

https://bugzilla.gnome.org/show_bug.cgi?id=730425