clif-util: Default to reading input files from stdin

Fixes #495
This commit is contained in:
Nick Fitzgerald
2018-09-06 16:46:49 -07:00
committed by Dan Gohman
parent 8fb681b86d
commit 90756a8a01
3 changed files with 21 additions and 9 deletions

View File

@@ -88,7 +88,7 @@ pub fn run_passes(verbose: bool, passes: &[String], target: &str, file: &String)
let mut runner = TestRunner::new(verbose);
let path = Path::new(file);
if path.is_file() {
if path == Path::new("-") || path.is_file() {
runner.push_test(path);
} else {
runner.push_dir(path);