Skip to content

Commit 6aec17e

Browse files
authored
Merge pull request #3897 from calebcartwright/fix-test-nested-int-file
fix a few tests
2 parents d35ebf7 + f82171a commit 6aec17e

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

Diff for: src/cargo-fmt/main.rs

+5-4
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,11 @@ mod cargo_fmt_tests {
917917
let exp_other = PathBuf::from(
918918
"tests/nested-test-files/root-and-nested-tests/tests/nested/other.rs",
919919
);
920-
assert_eq!(
921-
Some(vec![exp_baz, exp_foo_bar, exp_other]),
922-
get_nested_integration_test_files(&target_dir, &target_dir),
923-
)
920+
let files = get_nested_integration_test_files(&target_dir, &target_dir).unwrap();
921+
assert_eq!(3, files.len());
922+
assert!(files.contains(&exp_baz));
923+
assert!(files.contains(&exp_foo_bar));
924+
assert!(files.contains(&exp_other));
924925
}
925926
}
926927

Diff for: src/config/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ mod test {
476476

477477
#[test]
478478
fn test_valid_license_template_path() {
479+
if !crate::is_nightly_channel!() {
480+
return;
481+
}
479482
let toml = r#"license_template_path = "tests/license-template/lt.txt""#;
480483
let config = Config::from_toml(toml, Path::new("")).unwrap();
481484
assert!(config.license_template.is_some());

Diff for: tests/config/issue-3779.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
unstable_features = true
21
ignore = [
32
"tests/**/issue-3779/ice.rs"
43
]

Diff for: tests/source/issue-3779/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// rustfmt-unstable: true
12
// rustfmt-config: issue-3779.toml
23

34
#[path = "ice.rs"]

Diff for: tests/target/issue-3779/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// rustfmt-unstable: true
12
// rustfmt-config: issue-3779.toml
23

34
#[path = "ice.rs"]

0 commit comments

Comments
 (0)