Add or update examples for some commands (#4521)

* chore: add or update examples for some commands

* chore: code formatting
This commit is contained in:
Justin Ma
2022-02-18 21:06:52 +08:00
committed by GitHub
parent 1377693f0f
commit a5f9ad2a43
8 changed files with 89 additions and 9 deletions

View File

@ -76,16 +76,16 @@ fn test_no_color_flag() {
}
#[test]
fn test_html_color_where_flag_dark_false() {
fn test_html_color_cd_flag_dark_false() {
let actual = nu!(
cwd: ".", pipeline(
r#"
where --help | to html --html-color
cd --help | to html --html-color
"#
)
);
assert_eq!(
actual.out,
r"<html><style>body { background-color:white;color:black; }</style><body>Filter values based on a condition.<br><br>Usage:<br> &gt; where &lt;cond&gt; <br><br>Flags:<br> -h, --help<br> Display this help message<br><br>Parameters:<br> cond: condition<br><br></body></html>"
r"<html><style>body { background-color:white;color:black; }</style><body>Change directory.<br><br>Usage:<br> &gt; cd (path) <br><br>Flags:<br> -h, --help<br> Display this help message<br><br>Parameters:<br> (optional) path: the path to change to<br><br></body></html>"
);
}