mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 17:33:12 +02:00
Supply metadata.content_type
for to html
output (#14990)
# Description Adds pipeline metadata to the `to html` command output (hardcoded to `text/html; charset=utf-8`) # User-Facing Changes Pipeline metadata is now included with the `to html` command output.
This commit is contained in:
@ -14,6 +14,15 @@ fn out_html_simple() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn out_html_metadata() {
|
||||
let actual = nu!(r#"
|
||||
echo 3 | to html | metadata | get content_type
|
||||
"#);
|
||||
|
||||
assert_eq!(actual.out, r#"text/html; charset=utf-8"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn out_html_partial() {
|
||||
let actual = nu!(r#"
|
||||
|
Reference in New Issue
Block a user