Skip to content

Commit 4f52279

Browse files
committed
Tidy up and pass tests
1 parent 39301ae commit 4f52279

File tree

573 files changed

+8
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+8
-212
lines changed

cargo-fmt/Cargo.toml

Lines changed: 0 additions & 17 deletions
This file was deleted.

git-rustfmt/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

rustfmt-bin/Cargo.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

rustfmt-bin/build.rs

Lines changed: 0 additions & 59 deletions
This file was deleted.

rustfmt-config/Cargo.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

rustfmt-config/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

rustfmt-core/Cargo.toml

Lines changed: 0 additions & 33 deletions
This file was deleted.

rustfmt-core/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

rustfmt-format-diff/Cargo.toml

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
1211
#![feature(custom_attribute)]
1312
#![feature(decl_macro)]
1413
#![feature(match_default_bindings)]

rustfmt-core/tests/lib.rs renamed to tests/lib.rs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ extern crate lazy_static;
1313
#[macro_use]
1414
extern crate log;
1515
extern crate regex;
16-
extern crate rustfmt_config as config;
17-
extern crate rustfmt_core as rustfmt;
16+
extern crate rustfmt_nightly as rustfmt;
1817
extern crate term;
1918

2019
use std::collections::{HashMap, HashSet};
@@ -25,8 +24,8 @@ use std::path::{Path, PathBuf};
2524
use std::str::Chars;
2625

2726
use rustfmt::*;
28-
use config::{Color, Config, ReportTactic};
29-
use config::summary::Summary;
27+
use rustfmt::config::{Color, Config, ReportTactic};
28+
use rustfmt::config::summary::Summary;
3029
use rustfmt::filemap::write_system_newlines;
3130
use rustfmt::rustfmt_diff::*;
3231

@@ -211,25 +210,14 @@ fn idempotence_tests() {
211210
#[test]
212211
fn self_tests() {
213212
let mut files = get_test_files(Path::new("tests"), false);
214-
let bin_directories = vec![
215-
"cargo-fmt",
216-
"git-rustfmt",
217-
"rustfmt-bin",
218-
"rustfmt-format-diff",
219-
];
213+
let bin_directories = vec!["cargo-fmt", "git-rustfmt", "bin", "format-diff"];
220214
for dir in bin_directories {
221-
let mut path = PathBuf::from("..");
215+
let mut path = PathBuf::from("src");
222216
path.push(dir);
223-
path.push("src/main.rs");
224-
files.push(path);
225-
}
226-
let lib_directories = vec!["rustfmt-core", "rustfmt-config"];
227-
for dir in lib_directories {
228-
let mut path = PathBuf::from("..");
229-
path.push(dir);
230-
path.push("src/lib.rs");
217+
path.push("main.rs");
231218
files.push(path);
232219
}
220+
files.push(PathBuf::from("src/lib.rs"));
233221

234222
let (reports, count, fails) = check_files(files);
235223
let mut warnings = 0;
@@ -838,7 +826,7 @@ fn configuration_snippet_tests() {
838826
// entry for each Rust code block found.
839827
fn get_code_blocks() -> Vec<ConfigCodeBlock> {
840828
let mut file_iter = BufReader::new(
841-
fs::File::open(Path::new("..").join(CONFIGURATIONS_FILE_NAME))
829+
fs::File::open(Path::new(CONFIGURATIONS_FILE_NAME))
842830
.expect(&format!("Couldn't read file {}", CONFIGURATIONS_FILE_NAME)),
843831
).lines()
844832
.map(|l| l.unwrap())
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)