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

Help flag #43

Merged
merged 8 commits into from
Mar 16, 2025
Merged

Help flag #43

merged 8 commits into from
Mar 16, 2025

Conversation

Grillo-0
Copy link
Collaborator

@Grillo-0 Grillo-0 commented Mar 6, 2025

No description provided.

Grillo-0 added 6 commits March 6, 2025 17:45
To simplify tests that involves file IO, it would be great to have a set
o IO function that accept strings as an argument.
The fork return check has a wrong assert message, stating that a `pipe()`
function error out.
Some tests may not want to deal with some of the IO strings. So make
them optional.
We don't have a test that checks writing of output to a file, create
a simple one.
We don't have a test that checks the output flag working, create
a simple one.
It will be easier to parse more args if we split the parsing with the
application of those arguments.
@Grillo-0 Grillo-0 requested review from artP2 and JeanJPNM March 6, 2025 21:07
Copy link
Contributor

@JeanJPNM JeanJPNM left a comment

Choose a reason for hiding this comment

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

I've found no issues other than the memory leaks, lgtm.

This argument for loop is not future proof, is better to use the libc
getopt_long function for argument parsing.

Also, is good to have a way to declare new flags in a centralized
location, so abstract the getopt function with a `parse_cmdline`
function that receives a list of `struct flag`.
Now that we have a list of available flags it's easy to create a help
function.

Fixes: #42
@Grillo-0 Grillo-0 merged commit d25ee1c into develop Mar 16, 2025
2 checks passed
@Grillo-0 Grillo-0 deleted the help-flag branch March 16, 2025 22:26
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.

2 participants