-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Conversation
6f167ca
to
06097ab
Compare
please add tests to make sure we don't regress |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
+ Coverage 42.44% 49.29% +6.85%
==========================================
Files 13 14 +1
Lines 1555 1641 +86
Branches 209 217 +8
==========================================
+ Hits 660 809 +149
+ Misses 868 793 -75
- Partials 27 39 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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?
closes #15