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:
parent
a1cb3dba84
commit
d14f15862d
@ -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;
|
||||||
|
|
||||||
|
@ -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);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user