test asserts pass unescaped command output to printf
- Dominant language
- Shell
- Stars
- 12
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The `tests/_helper.bash` script defines three assert functions, (`assert`, `assert_success`, `assert_fail`) all of which expand `$output` (captured command output from bats) directly into `printf`'s first argument.
If the output contains a `%`, `printf` will exit with an error, and the output of the command that originally failed won't be printed/logged past the `%`.
This was happening in #20 as the output of `_install` includes curl's download progress table:
```
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.