rust/tests/ui/attributes/unix_sigpipe/unix_sigpipe-not-used.rs
Martin Nordholts d14f15862d tests: Combine unix_sigpipe-not-used.rs and unix_sigpipe-only-feature.rs
The only difference between the files is the presence/absence of

    #![feature(unix_sigpipe)]

attribute. Avoid duplication by using revisions instead.
2024-02-23 22:03:09 +01:00

13 lines
342 B
Rust

//@ revisions: with_feature without_feature
//@ run-pass
//@ aux-build:sigpipe-utils.rs
#![cfg_attr(with_feature, feature(unix_sigpipe))]
fn main() {
extern crate sigpipe_utils;
// SIGPIPE shall be ignored since #[unix_sigpipe = "..."] is not used
sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Ignore);
}