-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add option to suppress size from being printed #47
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,10 @@ pub struct Clargs { | |
/// Number of threads to use | ||
#[arg(short, long, default_value_t = 4)] | ||
pub threads: usize, | ||
|
||
/// Don't show size; disabled by default | ||
#[arg(long)] | ||
pub suppress_size: bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you reword to "Omit disk usage from output; disabled by default"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem, updated in both locations. |
||
} | ||
|
||
/// Order in which to print nodes. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use indoc::indoc; | ||
|
||
mod utils; | ||
|
||
#[test] | ||
fn suppress_size() { | ||
assert_eq!( | ||
utils::run_cmd(&["--suppress-size", "tests/data"]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the test is failing because the output isn't deterministic unless you provide the |
||
indoc!( | ||
" | ||
data | ||
├─ nylarlathotep.txt | ||
├─ lipsum | ||
│ └─ lipsum.txt | ||
├─ dream_cycle | ||
│ └─ polaris.txt | ||
├─ necronomicon.txt | ||
├─ the_yellow_king | ||
│ └─ cassildas_song.md | ||
└─ nemesis.txt" | ||
), | ||
"Failed to suppress size." | ||
) | ||
} |
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.
Related to other comment