|
| 1 | +use crate::tests::IntegrationTest; |
| 2 | + |
| 3 | +fn feature_test() { |
| 4 | + println!("Running feature test") |
| 5 | +} |
| 6 | + |
| 7 | +inventory::submit!(IntegrationTest { |
| 8 | + name: "feature", |
| 9 | + test_fn: feature_test |
| 10 | +}); |
| 11 | + |
| 12 | +pub fn pass_args() { |
| 13 | + macrotest::expand_args( |
| 14 | + "integration/tests/feature/expanded/*.rs", |
| 15 | + &["--features", "test-feature"], |
| 16 | + ); |
| 17 | +} |
| 18 | +inventory::submit!(IntegrationTest { |
| 19 | + name: "feature", |
| 20 | + test_fn: pass_args |
| 21 | +}); |
| 22 | + |
| 23 | +pub fn pass_expect_expanded_args() { |
| 24 | + // If you delete one of the `.expanded.rs` files, this test will fail. |
| 25 | + macrotest::expand_args( |
| 26 | + "integration/tests/feature/expanded/*.rs", |
| 27 | + &["--features", "test-feature"], |
| 28 | + ); |
| 29 | +} |
| 30 | +inventory::submit!(IntegrationTest { |
| 31 | + name: "feature", |
| 32 | + test_fn: feature_test |
| 33 | +}); |
| 34 | + |
| 35 | +// Suspended panicky tests for the moment |
| 36 | +// |
| 37 | +// pub fn fail_expect_expanded_args() { |
| 38 | +// // This directory doesn't have expanded files but since they're expected, the test will fail. |
| 39 | +// macrotest::expand_without_refresh_args( |
| 40 | +// "integration/tests/feature/unchanged/*.rs", |
| 41 | +// &["--features", "test-feature"], |
| 42 | +// ); |
| 43 | +// } |
| 44 | +// inventory::submit!(IntegrationTest { |
| 45 | +// name: "feature", |
| 46 | +// test_fn: fail_expect_expanded_args |
| 47 | +// }); |
0 commit comments