Skip to main content

Module escape

Module escape 

Source
Expand description

Language-specific string escaping for e2e test code generation.

Functions§

escape_c
Escape a string for embedding in a C string literal.
escape_csharp
Escape a string for embedding in a C# string literal.
escape_elixir
Escape a string for embedding in an Elixir string literal.
escape_go
Escape a string for embedding in a Go double-quoted string.
escape_java
Escape a string for embedding in a Java string literal.
escape_js
Escape a string for embedding in a JavaScript/TypeScript string literal.
escape_php
Escape a string for embedding in a PHP string literal.
escape_python
Escape a string for embedding in a Python string literal.
escape_r
Escape a string for embedding in an R string literal.
escape_ruby
Escape a string for embedding in a Ruby string literal.
escape_rust
Escape a string for embedding in a Rust string literal.
go_string_literal
Format a string as a Go string literal (backtick or quoted).
raw_string_hashes
Compute the number of # needed for a Rust raw string literal.
rust_raw_string
Format a string as a Rust raw string literal (r#“…”#).
sanitize_filename
Convert a category name to a sanitized filename component.
sanitize_ident
Sanitize an identifier for use as a test function name. Replaces non-alphanumeric characters with underscores, strips leading digits.