richardlehane / siegfried

signature-based file format identification
http://www.itforarchivists.com/siegfried
Apache License 2.0
217 stars 30 forks source link

Model siegfried output encoding (JSON) state #167

Closed ross-spencer closed 2 years ago

ross-spencer commented 3 years ago

Siegfried is currently outputting incorrectly encoded data given certain input data, e.g. control characters in file-paths. This commit adds tests that confirm this. Tests pass for each scenario, i.e. control character data when it fails validation, or valid data when it passes. The commit can be used to verify the success of any success or refactor as it will start to fail when siegfried starts to output entirely correct data.

Connected to https://github.com/richardlehane/siegfried/issues/165

ross-spencer commented 3 years ago

@richardlehane this looks nicer now! It was me not setting home which now i do which got me chasing my tail. Now back to a single nice commit for the tests.

ross-spencer commented 2 years ago

Now subsumed into https://github.com/richardlehane/siegfried/commit/0718a0c48e9cbb00187a01d97397389e5195f3f2 🚀