about summary refs log tree commit diff
path: root/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs')
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs
new file mode 100644
index 00000000000..b5adc2e5572
--- /dev/null
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-only-feature.rs
@@ -0,0 +1,13 @@
+// run-pass
+// aux-build:sigpipe-utils.rs
+
+#![feature(unix_sigpipe)]
+
+fn main() {
+    extern crate sigpipe_utils;
+
+    // Only #![feature(unix_sigpipe)] is enabled, not #[unix_sigpipe = "..."].
+    // This shall not change any behavior, so we still expect SIGPIPE to be
+    // ignored
+    sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Ignore);
+}