]> git.lizzy.rs Git - rust.git/commitdiff
document test, don't use grep
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 24 Mar 2016 17:24:04 +0000 (13:24 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 25 Mar 2016 18:07:20 +0000 (14:07 -0400)
src/test/run-make/a-b-a-linker-guard/Makefile
src/test/run-make/a-b-a-linker-guard/a.rs
src/test/run-make/a-b-a-linker-guard/b.rs

index 4a1b87de88d0182747351d39db8c070f31b1caf3..0962ebfbff546fa99ecf8206c4c46194e686272d 100644 (file)
@@ -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)
index f2511b044b50073dbe423ee97c042f880a789a91..e6cbe2e64d0e94201289c949bd702c72cb24b8c5 100644 (file)
@@ -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"]
 
index f30df120a3ba7ae4ea5f71a459cc9dbb972a621a..89fd48de5bbf94736dee0f4f3b3096d27758f5db 100644 (file)
@@ -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;