Add native and JS tests for escapeLiteral and escapeIdentifier.