-
Notifications
You must be signed in to change notification settings - Fork 21
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
lscpu: Add option --json #68
Conversation
6f167ca
to
06097ab
Compare
please add tests to make sure we don't regress |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================
==========================
☔ View full report in Codecov by Sentry. |
12928c3
to
7300355
Compare
@sylvestre test added |
31eac3d
to
b897808
Compare
@sylvestre Anything I should improve to this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, forgot to press submit
|
||
#[test] | ||
#[ignore] | ||
fn test_invalid_arg() { | ||
new_ucmd!().arg("--definitely-invalid").fails().code_is(1); | ||
} | ||
|
||
#[test] | ||
fn test_json() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please verify a bit more the format
at least some of these:
{
"lscpu": [
{
"field": "Architecture :",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't see what has been changed ? sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry I fixed the implementation only. I have no idea how to test the format here. The result varies on different platform. Not sure how can I implement a uniform interface for testing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sylvestre any suggestions?
ad65885
to
fc7bf39
Compare
I fixed the merge conflicts, rewrote |
Changes since last push:
|
closes #15