-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsync_usage_md.rs
More file actions
22 lines (19 loc) · 799 Bytes
/
Copy pathsync_usage_md.rs
File metadata and controls
22 lines (19 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//! The following tests check whether the help text files are outdated.
//!
//! If the tests fail, run `./generate-completions.sh` on the root of the repo to update the help files.
// Since the CLI in Windows looks a little different, and I am way too lazy to make two versions
// of help files, the following tests would only run in UNIX-like environment.
#![cfg(unix)]
#![cfg(feature = "cli")]
use parallel_disk_usage::usage_md::render_usage_md;
#[test]
fn usage_md() {
let actual = render_usage_md().unwrap_or_else(|error| {
panic!("failed to render usage markdown: {error}");
});
let expected = include_str!("../USAGE.md");
assert!(
actual.trim_end() == expected.trim_end(),
"USAGE.md is outdated, run ./generate-completions.sh to update it",
);
}