about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Koropoff <bkoropoff@gmail.com>2014-09-12 08:38:45 -0700
committerBrian Koropoff <bkoropoff@gmail.com>2014-09-12 18:09:47 -0700
commit3da255d35a7f9d53e4c31d5712f88ff14eaaf45e (patch)
tree9edf470d7f02c608a006f198d64f966dfd302687
parent957229c21504c734c49a94f1685f82ac225df3e7 (diff)
downloadrust-3da255d35a7f9d53e4c31d5712f88ff14eaaf45e.tar.gz
rust-3da255d35a7f9d53e4c31d5712f88ff14eaaf45e.zip
Add regression test for #17186
-rw-r--r--src/test/run-make/extern-diff-internal-name/Makefile6
-rw-r--r--src/test/run-make/extern-diff-internal-name/lib.rs12
-rw-r--r--src/test/run-make/extern-diff-internal-name/test.rs17
3 files changed, 35 insertions, 0 deletions
diff --git a/src/test/run-make/extern-diff-internal-name/Makefile b/src/test/run-make/extern-diff-internal-name/Makefile
new file mode 100644
index 00000000000..3787b879c1f
--- /dev/null
+++ b/src/test/run-make/extern-diff-internal-name/Makefile
@@ -0,0 +1,6 @@
+-include ../tools.mk
+
+all:
+	$(RUSTC) lib.rs
+	$(RUSTC) test.rs --extern foo=$(TMPDIR)/libbar.rlib 2>&1 | \
+		{ ! grep "using multiple versions of crate"; }
diff --git a/src/test/run-make/extern-diff-internal-name/lib.rs b/src/test/run-make/extern-diff-internal-name/lib.rs
new file mode 100644
index 00000000000..e8779bba13c
--- /dev/null
+++ b/src/test/run-make/extern-diff-internal-name/lib.rs
@@ -0,0 +1,12 @@
+// 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 = "bar"]
+#![crate_type = "rlib"]
diff --git a/src/test/run-make/extern-diff-internal-name/test.rs b/src/test/run-make/extern-diff-internal-name/test.rs
new file mode 100644
index 00000000000..ab1cf96999d
--- /dev/null
+++ b/src/test/run-make/extern-diff-internal-name/test.rs
@@ -0,0 +1,17 @@
+// 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.
+
+#![feature(phase)]
+
+#[phase(plugin, link)]
+extern crate foo;
+
+fn main() {
+}