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"Usage:
> cd (path)

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

Parameters:
(optional) path: the path to change to

" ); } #[test] fn test_no_color_flag() { let actual = nu!( cwd: ".", pipeline( r#" cd --help | to html --no_color "# ) ); assert_eq!( actual.out, r"Usage:
> cd (path)

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

Parameters:
(optional) path: the path to change to

" ); } #[test] fn test_html_color_where_flag_dark_false() { let actual = nu!( cwd: ".", pipeline( r#" where --help | to html --html_color "# ) ); assert_eq!( actual.out, r"Usage:
> where <cond>

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

Parameters:
cond: condition

" ); }