coreutils/test/tsort.rs

22 lines
497 B
Rust
Raw Normal View History

2015-05-10 03:38:48 +00:00
use std::process::Command;
use util::*;
2015-05-10 03:38:48 +00:00
static PROGNAME: &'static str = "./tsort";
#[path = "common/util.rs"]
#[macro_use]
mod util;
2015-05-10 03:38:48 +00:00
#[test]
fn test_sort_call_graph() {
let input = "call_graph.txt";
let output = "call_graph.expected";
let po = Command::new(PROGNAME)
.arg(input)
.output()
.unwrap_or_else(|err| panic!("{}", err));
assert_eq!(String::from_utf8(po.stdout).unwrap(), String::from_utf8(get_file_contents(output).into_bytes()).unwrap());
2015-05-10 03:38:48 +00:00
}