artifactize-tools 0.27.0

Portable scoped tools and safe file access for artifactize.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::*;

#[test]
fn command_output_normalizes_crlf() {
    assert_eq!(output(b"first\r\nsecond\n"), "first\nsecond\n");
}

// Only Windows command output uses the alternate UTF-16 encodings.
#[cfg(windows)]
#[test]
fn native_utf16_text_keeps_unicode_and_line_boundaries() {
    let utf16le = "help: 한글\r\n".encode_utf16().flat_map(u16::to_le_bytes);
    let bom: Vec<_> = [0xff, 0xfe].into_iter().chain(utf16le.clone()).collect();
    assert_eq!(output(&bom), "help: 한글\n");
    assert_eq!(output(&utf16le.collect::<Vec<_>>()), "help: 한글\n");
}