Repository navigation
Tests: Add WriteOptions::parse_options regression test - #713
Conversation
Serial-ATA
left a comment
There was a problem hiding this comment.
tests/taglib isn't the right place to put this, that dir only mirrors the tests from TagLib. tests/files/mpeg.rs would be better
6e2744e to
bc032c2
Compare
|
Got it moved. Sorry, thought about the other files tests before I put it in the wrong place... It just seemed so similar to the taglib one I had placed it after not realizing that those are a standard test lib (or something like that...) Hope this helps. Regards and thanks for the quick updates. I'm looking forward to 0.25.2 to start integrating it, but I am also trying to run some speed tests after making a move from lofty 0.22.x... |
|
Thanks, LGTM after the formatting is fixed
Have you noticed worse performance in newer versions? |
bc032c2 to
e6bb606
Compare
|
My 'sed' command to move it wasn't perfect... I should have looked at it in the file... All better now. The changes I made to move from 0.22.2 to 0.25.1 by replacing all the ::Unknown usage with file specific functions with the correct (I think) methods to, in particular, add a new non-standard tag seem a fair amount slower. It might be that I am reading multiple times (or some bad coding... ) when I should not be, or something else. Reads seem fast, the slowest seems to be writing to a flac with a new tag inserted. I have some timing checks in the code I am still testing to see if I can find the slowdown... |
WriteOptions::parse_options regression test
Summary
Adds a regression test for issue #711 / PR #712.
The test exercises writing a tag to an MP3 containing more than the default 1024 bytes of leading junk, while supplying ParseOptions with max_junk_bytes(3000) through WriteOptions.
This test fails with the pre-#712 implementation because the internal initial probe ignored WriteOptions.parse_options, and passes with the fix from PR #712.
Testing
cargo test -p lofty --test files mpeg::test_tag_save_with_parse_options
1 passed
cargo test -p lofty --test files
123 passed
0 failed
0 ignored