about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-03-24 13:24:04 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-03-25 14:07:20 -0400
commitfd25a63ba9e2b81e40889e4e9ff3fe355e933cb5 (patch)
tree8a480d7d5775ec9fb2882fcf72c0810fdaab83c7 /src/test
parentab0a87243e9bb97355cb0e4f53b2156cd68207fe (diff)
downloadrust-fd25a63ba9e2b81e40889e4e9ff3fe355e933cb5.tar.gz
rust-fd25a63ba9e2b81e40889e4e9ff3fe355e933cb5.zip
document test, don't use grep
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-make/a-b-a-linker-guard/Makefile7
-rw-r--r--src/test/run-make/a-b-a-linker-guard/a.rs10
-rw-r--r--src/test/run-make/a-b-a-linker-guard/b.rs10
3 files changed, 26 insertions, 1 deletions
diff --git a/src/test/run-make/a-b-a-linker-guard/Makefile b/src/test/run-make/a-b-a-linker-guard/Makefile
index 4a1b87de88d..0962ebfbff5 100644
--- a/src/test/run-make/a-b-a-linker-guard/Makefile
+++ b/src/test/run-make/a-b-a-linker-guard/Makefile
@@ -1,7 +1,12 @@
 -include ../tools.mk
 
+# Test that if we build `b` against a version of `a` that has one set
+# of types, it will not run with a dylib that has a different set of
+# types.
+
 all:
 	$(RUSTC) a.rs --cfg x -C prefer-dynamic
 	$(RUSTC) b.rs -C prefer-dynamic
+	$(call RUN,b)
 	$(RUSTC) a.rs --cfg y -C prefer-dynamic
-	$(call RUN,b) 2>&1 | grep "undefined symbol"
+	$(call FAIL,b)
diff --git a/src/test/run-make/a-b-a-linker-guard/a.rs b/src/test/run-make/a-b-a-linker-guard/a.rs
index f2511b044b5..e6cbe2e64d0 100644
--- a/src/test/run-make/a-b-a-linker-guard/a.rs
+++ b/src/test/run-make/a-b-a-linker-guard/a.rs
@@ -1,3 +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.
+
 #![crate_name = "a"]
 #![crate_type = "dylib"]
 
diff --git a/src/test/run-make/a-b-a-linker-guard/b.rs b/src/test/run-make/a-b-a-linker-guard/b.rs
index f30df120a3b..89fd48de5bb 100644
--- a/src/test/run-make/a-b-a-linker-guard/b.rs
+++ b/src/test/run-make/a-b-a-linker-guard/b.rs
@@ -1,3 +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.
+
 #![crate_name = "b"]
 
 extern crate a;