ForkView icon indicating copy to clipboard operation
ForkView copied to clipboard

Need tests

Open kainjow opened this issue 9 years ago • 3 comments

We need tests for resource fork parsing. I have lots of random files I will add to the repository. Also, can we store files with resource forks in git? Or, we could store all resource fork test files as normal files, and for each file test write the file to a resource fork in the temp folder and run the same tests on that too. This would then exercise the xattr code.

kainjow avatar Oct 10 '15 16:10 kainjow

Looks like I broke something with 9121c36d711100941e64b6fc60935f158fa6269b - will look into this soon.

kainjow avatar Oct 10 '15 16:10 kainjow

You should be able to run most of your ResourceManager tests against a data-fork based resource map, and have a pre-test script copy the fork to $filename/..namedfork/rsrc just for those tests designed to test for correct resource fork behaviour (and perhaps ones for other named forks too)

nickshanks avatar Oct 12 '15 10:10 nickshanks

That could work, but I'd prefer to use a more well-documented solution than writing to a special file path. I remember several OS versions ago there was a similar feature that got dropped altogether. It's looking like xattrs will be the way of reading resource forks going forward, especially when Apple replaces HFS.

kainjow avatar Oct 12 '15 19:10 kainjow