Initialization
Legend
| → | Has corresponding code |
| → | No direct match, but an alternative exists |
| → | No corresponding code |
| - | TODO |
| ( .. ) | Not localized |
| Example | Python pytest |
PHP PHPUnit |
Swift Testing |
Csharp xunit |
Bash bats |
Powershell pester |
C++ GoogleTest |
JavaScript Jest |
Kotlin jUnit |
|---|---|---|---|---|---|---|---|---|---|
| Assign empty string | '', "" | '', "" | "" | - | "" | '' | "" | - | "" |
| Assign raw string | r' ... ' | ' ... ' | - | - | → | - | - | - | """ ... """.drop(1) |
| String interpolation (variable) | f'{x}' | "{$x}" | - | - | - | "${...}" | - | - | "$x" |
| String interpolation (expression) | f'{expr}' | sprintf(...), concatenation, etc. | - | - | - | "$(...)" | - | - | "${x}" |
| ( assign_escaped_string ) | ' ... ' | " ... " | " ... " | - | $'...' | - | - | - | \ |
| ( assign_multiline_string ) | ''' ... ''' | <<<EOT ... EOT (here document) | - | - | - | - | - | - | """ ... """ |
| ( assign_multiline_string_trailing_newline_added_or_not ) | Yes | No | - | - | - | - | - | - | - |
| ( escape_and_quote ) | \ | \, ', " | - | - | - | - | - | - | → |
| ( is_single_and_double_quote_differ ) | No | Yes | - | - | - | - | - | - | - |
| ( here_document ) | use '''...''' | <<<EOT ... EOT | - | - | - | - | - | - | → |
| ( string_formatting ) | '%s' % v | sprintf('%s', $v) | - | - | - | - | - | - | - |