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] 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: the path to change to

Examples:
Change to your home directory
> 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: the path to change to

Examples:
Change to your home directory
> cd ~

" ); } #[test] fn test_html_color_cd_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: the path to change to

Examples:
Change to your home directory
> cd ~

" ); }