Skip to content

Conversation

@nicosuave
Copy link
Owner

Summary

Adds 42 new unit tests covering previously untested critical functions across render_gist_markdown and helper utilities. Test count increases from 40 to 82, all passing.

Tests Added

  • render_gist_markdown() (14 tests): Markdown generation with roles, tokens, models, and details
  • shell_quote() (6 tests): Shell-safe quoting with single quote escaping
  • truncate() (6 tests): Unicode-safe string truncation with edge cases
  • looks_like_internal_block() (8 tests): Detection of environment context, instructions, and agents config
  • normalize_role() (8 tests): Role normalization with case insensitivity
  • extract_string_field() (6 tests): JSON field extraction with fallback logic

Adds 42 new tests covering previously untested high-value functions:
- render_gist_markdown(): 14 tests for markdown generation
- shell_quote(): 6 tests for shell-safe quoting (security critical)
- truncate(): 6 tests for Unicode-safe truncation
- looks_like_internal_block(): 8 tests for block detection
- normalize_role(): 8 tests for role normalization
- extract_string_field(): 6 tests for JSON field extraction

All tests passing.
@nicosuave nicosuave merged commit beb5759 into main Jan 5, 2026
3 checks passed
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