Skip to content

fix: strengthen checksum test assertion to guard against regression #45

@jamesadevine

Description

@jamesadevine

The checksum test assertion in tests/compiler_tests.rs:148 is weaker than intended:

ust template_content.contains("sha256sum -c checksums.txt --ignore-missing")

This substring match would also pass against the old pattern (sha256sum -c checksums.txt --ignore-missing | grep -q ": OK"), so it doesn't guard against regression.

Suggested fix: Add a negative assertion alongside the positive check:

ust assert!( template_content.contains("sha256sum -c checksums.txt --ignore-missing"), "Template should verify checksum using checksums.txt" ); assert!( !template_content.contains("grep -q"), "Checksum verification should not pipe through grep" );

From PR #43 review feedback.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions