Skip to content

Commit ba8e937

Browse files
committed
docs(test): how to fix outdated completion
1 parent 96978ed commit ba8e937

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/completions.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
//! The following tests check whether the shell completion files are outdated.
2+
//!
3+
//! If the tests fail, run `./generate-completions.sh` on the root of the repo to update the completion files.
4+
15
// Since the CLI in Windows look a little different, and I am way too lazy to make two versions
26
// of completion files, the following tests would only run in UNIX-like environment.
37
#![cfg(unix)]
@@ -20,7 +24,10 @@ macro_rules! check {
2024
let received =
2125
Args::get_completion_string("pdu", Shell::$shell).expect("get completion string");
2226
let expected = include_str!($path);
23-
assert!(received == expected, "completion is outdated");
27+
assert!(
28+
received == expected,
29+
"completion is outdated, run ./generate-completions.sh to update them",
30+
);
2431
}
2532
};
2633
}

0 commit comments

Comments
 (0)