mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2026-01-15 01:31:08 +00:00
The main motivation is to move toward running those tests for a specific target, that is, if a test won't run on Windows, then we shouldn't build it. This was previously the default behavior and prevented a successful run on AppVeyor. I borrowed this pattern from the tests in the Cargo project.
17 lines
400 B
Rust
17 lines
400 B
Rust
use common::util::*;
|
|
|
|
static UTIL_NAME: &'static str = "tsort";
|
|
|
|
#[test]
|
|
fn test_sort_call_graph() {
|
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
|
let input = "call_graph.txt";
|
|
let output = "call_graph.expected";
|
|
|
|
let out = ucmd.arg(input)
|
|
.run()
|
|
.stdout;
|
|
|
|
assert_eq!(out,
|
|
String::from_utf8(at.read(output).into_bytes()).unwrap());
|
|
}
|