Covers tarWalk — the only non-trivial function in the file. Tests
use real temp directories so no mocking overhead:
- Empty directory emits one directory header
- Single file emits dir + file with correct content + size
- Nested directories preserve full path under prefix
- Symlinks are skipped (not emitted in archive)
- Prefix trailing slash is normalized (no double-slash bug)
- Prefix "." emits flat paths without "./" prefix
- Nonexistent directory propagates walk error
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>