-
Notifications
You must be signed in to change notification settings - Fork 32
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
Bats tests don't test for shell code correctness #74
Comments
As commented, I have looked into the build now. It also got some updates, also towards building with more ease: we can just The issue description makes sense to me. I'm already using I'm also cleaning out a rough edge for the bats testing so it installs within the project tree for the in-tree build. Comparing against a master (you suggest from one PHP version) would add the benefit to spare to store the master within the repository. I'll take a look, right now I'm actually scratching my head why there are two master files:
and combined with that, why there are two php files:
The default one could just be build from the cached one if I get this right. And likewise the txt files are only to test for both such cases which really looks redundant. This just FYI, will now look forward the changes as proposed. Btw. on which platform are you developing? |
My main system is Slackware Linux x86_64. I have Docker installed, so potentially I could test on all versions of Ubuntu as well. |
I'm on Ubuntu myself, also w/ Docker. Reminds me that next to shellcheck'ing we could also summon a matrix w/ Docker containers. But regardless: Do you have any clue on how to automatically test the autocompletion after sourced? We already have test application in fixtures (acme), so that part would be covered, I'm merely thinking about how to test the auto-complete. So far I'm doing it manually after sourcing for the changes but this is of a similar burden. I'd also already see it an improvement if this is for bash only as I can imagine this is different for each shell. Feedback, even rough, appreceated. |
The tests in
tests/*.bats
don't test for the correctness or usability of the shell code generated.All of the tests merely compare the output against a cached copy of what it assumes the output should be.
This leads to inflexible tests, and more effort to make trivial changes.
An example of a better test methodology might be:
Excerpt of my original comment in #73 (~43 lines)
Originally posted by @h3xx in #73 (comment)
The text was updated successfully, but these errors were encountered: