about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run-make/allow-warnings-cmdline-stability/Makefile16
-rw-r--r--tests/run-make/allow-warnings-cmdline-stability/rmake.rs11
2 files changed, 11 insertions, 16 deletions
diff --git a/tests/run-make/allow-warnings-cmdline-stability/Makefile b/tests/run-make/allow-warnings-cmdline-stability/Makefile
deleted file mode 100644
index 368a39af6bf..00000000000
--- a/tests/run-make/allow-warnings-cmdline-stability/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-# ignore-cross-compile
-include ../tools.mk
-
-# Test that -A warnings makes the 'empty trait list for derive' warning go away
-DEP=$(shell $(RUSTC) bar.rs)
-OUT=$(shell $(RUSTC) foo.rs -A warnings 2>&1 | grep "warning" )
-
-all: foo bar
-	test -z '$(OUT)'
-
-# These are just to ensure that the above commands actually work
-bar:
-	$(RUSTC) bar.rs
-
-foo: bar
-	$(RUSTC) foo.rs -A warnings
diff --git a/tests/run-make/allow-warnings-cmdline-stability/rmake.rs b/tests/run-make/allow-warnings-cmdline-stability/rmake.rs
new file mode 100644
index 00000000000..8f6fe6bd0b6
--- /dev/null
+++ b/tests/run-make/allow-warnings-cmdline-stability/rmake.rs
@@ -0,0 +1,11 @@
+// Test that `-Awarnings` suppresses warnings for unstable APIs.
+
+use run_make_support::{assert_not_contains, rustc};
+
+fn main() {
+    rustc().input("bar.rs").run();
+    let output = rustc().input("foo.rs").arg("-Awarnings").run();
+
+    assert_not_contains(&String::from_utf8(output.stdout).unwrap(), "warning");
+    assert_not_contains(&String::from_utf8(output.stderr).unwrap(), "warning");
+}