-
Notifications
You must be signed in to change notification settings - Fork 38
Grmtools section array values #604
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
Grmtools section array values #604
Conversation
|
My only minor overall comment is that none of the tests -- I think! -- use more than 1 element in the array? |
|
The two in 60df6f9 calc_input and ctfails/calc_bad_input both use multiple values. In the first one, i added the same glob twice. But actually now that I think about it this latter case is probably unreliable because of multi-threaded test runners and the globbing may be spuriously matching an empty set of files. These should really only be matching files within the .test |
|
I think the "same glob" twice probably isn't worth it (and I'd probably remove it to avoid confusing later readers): buggy code could just "accidentally" reuse the first glob, and the outcome would be the same. The second case seems sensible, although maybe we can make it rely on some set of files that we know will exist? But that might be hard. |
|
I'll add some more files to the extra_files dict, using a different extension, and glob those, should be easy. |
|
Good idea! |
|
I think this is ready to squash; and then we're ready to make a release? |
|
I think so too, I'll squash it in the morning after having another look over it, in case I can think of anything else and also because I'm likely too tired to squash it without making a mess of everything. Edit: I should probably do another PR going over any clippy lints that may have crept in |
|
The only thing that came to mind over night was the behavior when a glob matches zero files, I could probably argue for either, but changing it for typo resistance seems worth considering. |
|
Good point! Experience suggests to me that it's better if we error if there are no matches. |
|
I added that in e91fa58 it turns out that nimbleparse was already working that way, |
|
Please squash. |
1. Split up the current `parse_value` function into `parse_key_value`, and `parse_setting` functions. 2. Add support for arrays to `parse_setting`. 3. Switch the top-level `test_files` support to expect an array.
89a2aa7 to
57717e3
Compare
|
Squashed |
Here is a first working attempt at adding array values to the grmtools section, and migrating the
test_filesto using that.I also did some manual testing, e.g. that adding
"*.bad_input"to thecalc_input.testcauses a testsuite failure.