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

ptx: implement breakfile option #3455

Merged
merged 6 commits into from
May 2, 2022
Merged

Conversation

mike-kfed
Copy link
Contributor

@mike-kfed mike-kfed commented Apr 29, 2022

this PR closes #1763 and #1807

let chars =
read_char_filter_file(matches, options::BREAK_FILE).map_err_context(String::new)?;
let mut hs: HashSet<char> = if config.gnu_ext {
HashSet::new() // really only chars found in file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to have a test covering this?
thanks

Copy link
Contributor Author

@mike-kfed mike-kfed Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry not sure what you mean by "this".

side note: ptx does not support gnu-ext to be true (as of today) but I implemented the behaviour already for it for the future when somebody adds GNU extensions (there is already other code doing so too) = testing for gnu_ext to be true in the integration test would be an error at argument parsing level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This = this line, sorry :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the default view doesn't show the line number just a block of code, but in the detail view it says line 134, hence my confusion. Well it is true this is not covered, because as I mentioned the GNU extensions are not implemented and if config.gnu_ext = true is the goal it would not pass cmd-arg parsing see line 231 - meaning a test for this would either fail or not check this line either. Line 293 by that definition is not covered too btw. If there's an issue for implementing the gnu extensions for ptx I suggest adding a test for L134 being an additional task there? Or keep that PR open until somebody does the gnu extensions? Not sure how to proceed here, sorry.

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.

ptx: implement -b
2 participants