use nu_test_support::{nu, pipeline}; #[test] fn out_html_simple() { let actual = nu!( cwd: ".", pipeline( r#" echo 3 | to html "# )); assert_eq!( actual.out, r"3" ); } #[test] fn out_html_partial() { let actual = nu!( cwd: ".", pipeline( r#" echo 3 | to html -p "# )); assert_eq!( actual.out, "
3
" ); } #[test] fn out_html_table() { let actual = nu!( cwd: ".", pipeline( r#" echo '{"name": "darren"}' | from json | to html "# )); assert_eq!( actual.out, r"
name
darren
" ); } #[test] #[ignore] fn test_cd_html_color_flag_dark_false() { let actual = nu!( cwd: ".", pipeline( r#" cd --help | to html --html-color "# ) ); assert_eq!( actual.out, r"Change directory.

Usage:
> cd (path)

Flags:
-h, --help
Display this help message

Parameters:
(optional) path <Directory>: the path to change to

Examples:
Change to your home directory
> cd ~

Change to a directory via abbreviations
>
cd
d/s/9

Change to the previous working directory ($OLDPWD)
>
cd
-

" ); } #[test] fn test_no_color_flag() { let actual = nu!( cwd: ".", pipeline( r#" cd --help | to html --no-color "# ) ); assert_eq!( actual.out, r"Change directory.

Usage:
> cd (path)

Flags:
-h, --help - Display this help message

Parameters:
(optional) path <Directory>: the path to change to

Examples:
Change to your home directory
> cd ~

Change to a directory via abbreviations
> cd d/s/9

Change to the previous working directory ($OLDPWD)
> cd -

" ); }