diff --git a/src/test/run-make/hir-tree/Makefile b/src/test/run-make/hir-tree/Makefile new file mode 100644 index 00000000000..59e4ae8a30d --- /dev/null +++ b/src/test/run-make/hir-tree/Makefile @@ -0,0 +1,9 @@ +-include ../tools.mk + +# Test that hir-tree output doens't crash and includes +# the string constant we would expect to see. + +all: + $(RUSTC) -o $(TMPDIR)/input.hir -Z unstable-options \ + --unpretty=hir-tree input.rs + grep '"Hello, Rustaceans!\\n"' $(TMPDIR)/input.hir diff --git a/src/test/run-make/hir-tree/input.rs b/src/test/run-make/hir-tree/input.rs new file mode 100644 index 00000000000..12adc083bcd --- /dev/null +++ b/src/test/run-make/hir-tree/input.rs @@ -0,0 +1,13 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("Hello, Rustaceans!"); +}