summaryrefslogtreecommitdiffstats
path: root/tests/run-make/crate-name-priority
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/crate-name-priority')
-rw-r--r--tests/run-make/crate-name-priority/Makefile12
-rw-r--r--tests/run-make/crate-name-priority/foo.rs1
-rw-r--r--tests/run-make/crate-name-priority/foo1.rs3
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/run-make/crate-name-priority/Makefile b/tests/run-make/crate-name-priority/Makefile
new file mode 100644
index 000000000..4adaa75a7
--- /dev/null
+++ b/tests/run-make/crate-name-priority/Makefile
@@ -0,0 +1,12 @@
+# ignore-cross-compile
+include ../tools.mk
+
+all:
+ $(RUSTC) foo.rs
+ rm $(TMPDIR)/$(call BIN,foo)
+ $(RUSTC) foo.rs --crate-name bar
+ rm $(TMPDIR)/$(call BIN,bar)
+ $(RUSTC) foo1.rs
+ rm $(TMPDIR)/$(call BIN,foo)
+ $(RUSTC) foo1.rs -o $(TMPDIR)/$(call BIN,bar1)
+ rm $(TMPDIR)/$(call BIN,bar1)
diff --git a/tests/run-make/crate-name-priority/foo.rs b/tests/run-make/crate-name-priority/foo.rs
new file mode 100644
index 000000000..f328e4d9d
--- /dev/null
+++ b/tests/run-make/crate-name-priority/foo.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/run-make/crate-name-priority/foo1.rs b/tests/run-make/crate-name-priority/foo1.rs
new file mode 100644
index 000000000..4ff3bd951
--- /dev/null
+++ b/tests/run-make/crate-name-priority/foo1.rs
@@ -0,0 +1,3 @@
+#![crate_name = "foo"]
+
+fn main() {}