Skip to content

test: is_image unit tests and sanitize_name edge cases (16 new tests)#23

Open
hai-pilgrim wants to merge 1 commit intomarksverdhei:mainfrom
hai-pilgrim:test/is-image-coverage
Open

test: is_image unit tests and sanitize_name edge cases (16 new tests)#23
hai-pilgrim wants to merge 1 commit intomarksverdhei:mainfrom
hai-pilgrim:test/is-image-coverage

Conversation

@hai-pilgrim
Copy link
Copy Markdown

Summary

  • Sources is_image in setup_file alongside existing is_binary
  • Unit tests for all 8 supported image formats detected by is_image: JPEG (jpg/jpeg), PNG, GIF, BMP, TIFF, SVG (extension fallback), WebP
  • Negative cases: text file, HTML, and binary .bin are not detected as images
  • Integration tests: jpg/png are processed normally (not skipped as binary)
  • 3 extra sanitize_name edge cases: multi-space/hyphen collapsing, quote stripping, multiline input uses last non-empty line

Test plan

  • 16 new tests all pass (3 pre-existing failures in is_binary due to missing file command in this env are unrelated)
  • Run: bats test.sh

🤖 Generated with Claude Code

…sts)

Sources is_image in setup_file. Adds coverage for all 8 image formats
(jpg/jpeg, png, gif, bmp, tiff, svg, webp) plus negative cases (txt,
html, .bin). Integration tests verify jpg/png are processed instead of
skipped as binary. Three extra sanitize_name edge cases: multi-space
collapsing, quote stripping, multiline input (last line wins).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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