Skip to content

Commit

Permalink
Merge pull request #3897 from calebcartwright/fix-test-nested-int-file
Browse files Browse the repository at this point in the history
fix a few tests
  • Loading branch information
scampi authored Oct 31, 2019
2 parents d35ebf7 + f82171a commit 6aec17e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/cargo-fmt/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,10 +917,11 @@ mod cargo_fmt_tests {
let exp_other = PathBuf::from(
"tests/nested-test-files/root-and-nested-tests/tests/nested/other.rs",
);
assert_eq!(
Some(vec![exp_baz, exp_foo_bar, exp_other]),
get_nested_integration_test_files(&target_dir, &target_dir),
)
let files = get_nested_integration_test_files(&target_dir, &target_dir).unwrap();
assert_eq!(3, files.len());
assert!(files.contains(&exp_baz));
assert!(files.contains(&exp_foo_bar));
assert!(files.contains(&exp_other));
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ mod test {

#[test]
fn test_valid_license_template_path() {
if !crate::is_nightly_channel!() {
return;
}
let toml = r#"license_template_path = "tests/license-template/lt.txt""#;
let config = Config::from_toml(toml, Path::new("")).unwrap();
assert!(config.license_template.is_some());
Expand Down
1 change: 0 additions & 1 deletion tests/config/issue-3779.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
unstable_features = true
ignore = [
"tests/**/issue-3779/ice.rs"
]
1 change: 1 addition & 0 deletions tests/source/issue-3779/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// rustfmt-unstable: true
// rustfmt-config: issue-3779.toml

#[path = "ice.rs"]
Expand Down
1 change: 1 addition & 0 deletions tests/target/issue-3779/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// rustfmt-unstable: true
// rustfmt-config: issue-3779.toml

#[path = "ice.rs"]
Expand Down

0 comments on commit 6aec17e

Please sign in to comment.