Improve notify_message output to not interpret % as placeholder#141
Conversation
|
Thanks @aarvio for your contribution but there's a problem. bash_unit depends on printf formatting in several places. For instance, look into assert_equals: See how Looking at that, this is ugly but it needs to be addressed before accepting your contribution. I'm not sure how, though 🤔 |
|
Maybe clearer just to ensure that % is not interpreted as placeholder and keep the escape sequence rendering as it is. |
|
@pgrange updated the topic of PR to match the content. Escape sequences are handled as before but % should not be interpreted as placeholder. |
- Use similar printf formating for both text and TAP formats. Prevent printf from interpreting `%` as format placeholders and backslash escape sequences, preserving exact failure messages. - Add shellcheck disable 2329 (same reasoning as 2317). This ensures notify_message prints messages literally, avoiding misleading or mangled failure output.
- To keep it more proper looking handle escape sequences are before. Just ensure % are not interpreted as placeholders.
d312f3f to
974ccd1
Compare
%as format placeholders and backslash escape sequences, preserving exact failure messages.This ensures notify_message prints messages literally, avoiding misleading or mangled failure output.