Skip to content
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

Various refactors and bugfixes #64

Merged
merged 5 commits into from
May 12, 2018
Merged

Various refactors and bugfixes #64

merged 5 commits into from
May 12, 2018

Conversation

kimgr
Copy link
Owner

@kimgr kimgr commented May 12, 2018

Primarily covers the command-line driver with tests

kimgr added 2 commits May 12, 2018 14:40
Prior to this change, in the non-split case where all modules were
generated to stdout, the header would be printed once for every module
even if they came from the same input file.
The test harness would reimplement the command-line driver in a simpler
form. That was nice, but would also mean that we had no test coverage
for the driver.

Turn it around so that the test harness now calls the parameterized
driver main.

No functional change intended.
kimgr added 3 commits May 12, 2018 18:15
* --outdir is not part of the mutually-exclusive group
* Make the action group required so either --parse, --sema or --gen must
  be specified
* Pass --gen from test scripts
Add _maybe_open which acts as a context manager for either a file
object (if a filename is provided) or sys.stdout (if '-' is provided).

This is a little weird, but makes it much clearer what's going on in
main().
@kimgr kimgr merged commit 7ade34d into master May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant