You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(test-doubles): use builtin echo/printf in spy to prevent recursion when spying on echo or printf
Spying on 'echo' or 'printf' caused bashunit to hang indefinitely because
the generated spy function called back into itself through bashunit's
internal use of these builtins.
Changes:
- Use 'builtin echo' and 'builtin printf' inside the eval'd spy function
body in bashunit::spy to prevent recursive calls when spying on echo
or printf
- Use 'builtin echo' in bashunit::mock's no-arg form for the same reason
- Use 'builtin echo' in bashunit::helper::normalize_variable_name so that
spy assertions remain functional even when echo is spied upon
- Add functional tests (with fixtures) verifying that spying on echo and
printf completes without hanging
Fixes#607
0 commit comments