diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2018-05-04 09:35:56 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2018-05-04 09:35:56 +1200 |
| commit | b6cd17f28ae314f2484ff05d3ce57652d51c5e85 (patch) | |
| tree | eb2c3d2b74fcfb0cea9a8ccb2bec4b55fa2bb21c /src/test | |
| parent | a06caf6b170d2727783ce78e58fcd85e9ae5131e (diff) | |
Fix test bug (again)
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/mod.rs b/src/test/mod.rs index ba0c75a1834..4afbf74ae83 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -885,30 +885,28 @@ impl Drop for TempFile { #[test] fn verify_check_works() { - let file_name = "temp_check.rs"; - let _temp_file = make_temp_file(file_name); + let temp_file = make_temp_file("temp_check.rs"); assert_cli::Assert::command(&[ "cargo", "run", "--bin=rustfmt", "--", "--write-mode=check", - file_name, + temp_file.path.to_str().unwrap(), ]).succeeds() .unwrap(); } #[test] fn verify_diff_works() { - let file_name = "temp_diff.rs"; - let _temp_file = make_temp_file(file_name); + let temp_file = make_temp_file("temp_diff.rs"); assert_cli::Assert::command(&[ "cargo", "run", "--bin=rustfmt", "--", "--write-mode=diff", - file_name, + temp_file.path.to_str().unwrap(), ]).succeeds() .unwrap(); } |
