Skip to content

fix(test): use portable command for empty-output test#88

Merged
domenkozar merged 1 commit into
cachix:mainfrom
kimjune01:fix/portable-empty-command-test
May 12, 2026
Merged

fix(test): use portable command for empty-output test#88
domenkozar merged 1 commit into
cachix:mainfrom
kimjune01:fix/portable-empty-command-test

Conversation

@kimjune01
Copy link
Copy Markdown
Contributor

Summary

  • Replace echo -n with printf '' in test_generate_command_empty_output
  • echo -n is non-POSIX and prints literal -n on macOS /bin/sh, causing the test to fail
  • printf '' produces empty output on all POSIX shells

Test plan

  • All 154 cargo tests pass
  • Verified printf '' produces empty output on macOS and Linux
  • No other echo -n usage in codebase

`echo -n ''` is not POSIX-portable: macOS /bin/sh (which is dash)
prints "-n" literally instead of suppressing the newline, causing
`test_generate_command_empty_output` to pass unexpectedly on macOS.

Replace with `printf ''` which produces zero bytes on all platforms.
@domenkozar domenkozar merged commit 4f0b3ee into cachix:main May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants