Open Cmdv opened 5 years ago
I may need tips regards to how I would write a test for this, I was thinking literally making sure calling the function twice with the same name returns different SHAs? 😸
I ended up working it out, but I'm unsure if that single test is enough it just makes sure calling the function twice returns different SHAs
Ah ok so is it a case of just removing this randomising part of the function?
Removing the randomness and using file contents, rather than file name, as the hash input.
@owickstrom I've tried to research how to Hash a file content in Haskell, but I'm not aquatentced on the subject overall so not been able to work out what needs to be done.
If you have any pointers that would be great 👍
@owickstrom totally forgot I was doing this!! is this still a valid PR and if so did you have any idea into hashing a file with Haskell?
Hey @Cmdv! No worries, but feel free to pick this up again if you'd like. I don't have any pointers for you right now, but if I find some time I'll try to post some links.
Description:
This pull requests fixes #24
Make sure to describe (where applicable):
createSHA1BaseName
could be tested to make sure given the same file name different SHA's are created, would that suffice?Checklist:
Please make sure to check the following items (that are applicable.)
How to test: import new video file and look at the command line output to see the naming of files should be as follows:
TODO: Testing instructions for reviewer. I split this functionality out into its own file as I was unsure where it could live. This is because the function could also be used with #72