diff options
| author | Thomas Jespersen <laumann.thomas@gmail.com> | 2015-04-14 15:40:10 +0200 |
|---|---|---|
| committer | Thomas Jespersen <laumann.thomas@gmail.com> | 2015-04-14 15:40:10 +0200 |
| commit | bed2d33523be222195aff71bb813eb14a1faef97 (patch) | |
| tree | 07c519c06b9e71c51ba8107e75f131d7252f1d93 /src | |
| parent | d14109ec7e90f42a7cb966415b96094b146d3706 (diff) | |
| download | rust-bed2d33523be222195aff71bb813eb14a1faef97.tar.gz rust-bed2d33523be222195aff71bb813eb14a1faef97.zip | |
Add "run-make" test for trace-macros flag
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-make/trace-macros-flag/Makefile | 9 | ||||
| -rw-r--r-- | src/test/run-make/trace-macros-flag/hello.rs | 13 | ||||
| -rw-r--r-- | src/test/run-make/trace-macros-flag/hello.trace | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/test/run-make/trace-macros-flag/Makefile b/src/test/run-make/trace-macros-flag/Makefile new file mode 100644 index 00000000000..fc49c8c900c --- /dev/null +++ b/src/test/run-make/trace-macros-flag/Makefile @@ -0,0 +1,9 @@ +# This test verifies that "-Z trace-macros" works as it should. The traditional +# "hello world" program provides a small example of this as not only println! is +# listed, but also print! (since println! expands to this) + +-include ../tools.mk + +all: + $(RUSTC) -o $(TMPDIR)/hello -Z trace-macros hello.rs &> $(TMPDIR)/hello.trace + diff -u $(TMPDIR)/hello.trace hello.trace diff --git a/src/test/run-make/trace-macros-flag/hello.rs b/src/test/run-make/trace-macros-flag/hello.rs new file mode 100644 index 00000000000..42d3d4c799d --- /dev/null +++ b/src/test/run-make/trace-macros-flag/hello.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 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("Hello, World!"); +} diff --git a/src/test/run-make/trace-macros-flag/hello.trace b/src/test/run-make/trace-macros-flag/hello.trace new file mode 100644 index 00000000000..cf733339ead --- /dev/null +++ b/src/test/run-make/trace-macros-flag/hello.trace @@ -0,0 +1,2 @@ +println! { "Hello, World!" } +print! { concat ! ( "Hello, World!" , "\n" ) } |
