-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UNIX Compatibility 2: Electric Boogaloo #26
Conversation
I definitely did not fully test my last commit, so this commit resolves the issue with the extractAllFiles() method on UNIX-based filesystems.
Can you please add a unit test then? |
Not to be that guy, but do you have a reference I could use in developing that unit test then? I'm still very, very new to Java... I think that would be using JQuery, right? |
Sorry, I realize that comment may have seemed dismissive at a second glance. I would definitely be interested in learning how to write a unit test. The stuff in the src/test folder doesn't seem to difficult, but I'm not sure how it's supposed to actually check anything? Does gradle take care of running all of those? Honestly, this is going to be really embarrassing to admit, but I couldn't even figure out how to turn logging on, so I had to debug this one by hand -- that's why it took me 4 days to change 2 lines of code... 😡 🤕 |
Java has nothing to do with JavaScript, and therefore also jQuery. The testing framework we use is https://testng.org/doc/index.html but you don't need to read its docs to make a test 😄 You can copy of of the tests from Thanks for your efforts 👍 |
Ah, I see. Looking at my Java notes, it was JUnit I was thinking of, not JQuery. Still, thanks for pointing that out! 😄 With all respect, I'm not sure this issue is something that can be unit-tested for. Or maybe it already has? Here's a link to the output of the out/ directory after running I believe this is the result of the testExtractAll() test, since I didn't add a test yet. But I think this conclusively proves my issue? Here's the output of Again, no tests added by me so far. 😃
|
If there already would be a test, it should have failed with the unix incompatibilities. |
Yeah, that's why I figured we couldn't unit test for this. Per my screenshot, a file gets created in either case with the contents of the listfile as the name. If we test for the file existing, it will exist. We would have to test the filename of the created file and ensure it matches only the very last part of the path if we wanted to validate. Basically, we need a way to tell that As written, any tests that validate the existence of the file by matching on the name will surely pass unless a distinction is made between the filename and the relative path from the contents of the listfile. |
Hey sorry, I totally forgot about this, I think I'm not getting emails. |
Hi @Frotty No, I haven't added tests. I haven't done unit testing in Java yet so I might be off-base here, but I don't believe there's a way to test for this condition, based on the images I included in my last post. Any tests that validate the existence of the file by matching on the name will pass unless a distinction is made between the filename and the relative path from the contents of the listfile. And I'm not sure how to make such a distinction in a test. Sorry. But you can probably tell from the images how this bug works, so if you'd like to take a shot at writing the test I would be eager to see how you would approach this. |
I guess this is still useful, sorry for not responding. |
I definitely did not fully test my last commit,
so this commit resolves the issue with the
extractAllFiles() method on UNIX-based
filesystems.