system 0.3.4

Cross-platform crate to easily run shell commands, similar to the C system function.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use system::system_output;

#[test]
fn test() {
    let out = system_output("echo Hello, world!").expect("Failed to run command.");
    let stdout = String::from_utf8_lossy(&out.stdout);

    #[cfg(target_os = "windows")]
    assert_eq!(stdout, "Hello, world!\r\n");

    #[cfg(not(target_os = "windows"))]
    assert_eq!(stdout, "Hello, world!\n");
}