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.
This commit is contained in:
Martin Nordholts 2024-02-09 08:47:47 +01:00
parent a1cb3dba84
commit d14f15862d
2 changed files with 3 additions and 13 deletions

View File

@ -1,6 +1,9 @@
//@ revisions: with_feature without_feature
//@ run-pass //@ run-pass
//@ aux-build:sigpipe-utils.rs //@ aux-build:sigpipe-utils.rs
#![cfg_attr(with_feature, feature(unix_sigpipe))]
fn main() { fn main() {
extern crate sigpipe_utils; extern crate sigpipe_utils;

View File

@ -1,13 +0,0 @@
//@ 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);
}