Closed
Description
Every line containing #[ignore]
gets cut out entirely. This isn't desired behavior,
because it prohibits inline use of the attribute. In particular, the following (from #394):
tests! {
test_classification {
#[ignore] test_1(1, Classification::Deficient);
#[ignore] test_2(2, Classification::Deficient);
#[ignore] test_4(4, Classification::Deficient);
#[ignore] test_6(6, Classification::Perfect);
#[ignore] test_12(12, Classification::Abundant);
#[ignore] test_28(28, Classification::Perfect);
#[ignore] test_30(30, Classification::Abundant);
#[ignore] test_32(32, Classification::Deficient);
#[ignore] test_33550335(33550335, Classification::Abundant);
#[ignore] test_33550336(33550336, Classification::Perfect);
#[ignore] test_33550337(33550337, Classification::Deficient);
}
}
gets trimmed down to:
tests! {
test_classification {
}
}
instead of the desired:
tests! {
test_classification {
test_1(1, Classification::Deficient);
test_2(2, Classification::Deficient);
test_4(4, Classification::Deficient);
test_6(6, Classification::Perfect);
test_12(12, Classification::Abundant);
test_28(28, Classification::Perfect);
test_30(30, Classification::Abundant);
test_32(32, Classification::Deficient);
test_33550335(33550335, Classification::Abundant);
test_33550336(33550336, Classification::Perfect);
test_33550337(33550337, Classification::Deficient);
}
}
We have to fix this using the uglier pattern:
tests! {
test_classification {
#[ignore]
test_1(1, Classification::Deficient);
#[ignore]
test_2(2, Classification::Deficient);
#[ignore]
test_4(4, Classification::Deficient);
#[ignore]
test_6(6, Classification::Perfect);
#[ignore]
test_12(12, Classification::Abundant);
#[ignore]
test_28(28, Classification::Perfect);
#[ignore]
test_30(30, Classification::Abundant);
#[ignore]
test_32(32, Classification::Deficient);
#[ignore]
test_33550335(33550335, Classification::Abundant);
#[ignore]
test_33550336(33550336, Classification::Perfect);
#[ignore]
test_33550337(33550337, Classification::Deficient);
}
}
Desired behavior: this sed line removes only the text #[ignore]
when encountered in the relevant files.
Metadata
Metadata
Assignees
Labels
No labels