Skip to content

Commit

Permalink
Better fmt for file body
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
  • Loading branch information
Rustin170506 committed Aug 21, 2021
1 parent 4225c46 commit 4c11002
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions tests/testsuite/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,41 +1691,41 @@ fn fix_with_run_cargo_in_proc_macros() {
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.1.0"
edition = "2018"
[package]
name = "foo"
version = "0.1.0"
edition = "2018"
[lib]
proc-macro = true
"#,
[lib]
proc-macro = true
"#,
)
.file(
"src/lib.rs",
r#"
use proc_macro::*;
use proc_macro::*;
#[proc_macro]
pub fn foo(_input: TokenStream) -> TokenStream {
let output = std::process::Command::new("cargo")
.args(&["metadata", "--format-version=1"])
.output()
.unwrap();
eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
println!("{}", std::str::from_utf8(&output.stdout).unwrap());
"".parse().unwrap()
}
"#,
#[proc_macro]
pub fn foo(_input: TokenStream) -> TokenStream {
let output = std::process::Command::new("cargo")
.args(&["metadata", "--format-version=1"])
.output()
.unwrap();
eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
println!("{}", std::str::from_utf8(&output.stdout).unwrap());
"".parse().unwrap()
}
"#,
)
.file(
"src/bin/main.rs",
r#"
use foo::foo;
use foo::foo;
fn main() {
foo!("bar")
}
"#,
fn main() {
foo!("bar")
}
"#,
)
.build();
p.cargo("fix --allow-no-vcs")
Expand Down

0 comments on commit 4c11002

Please sign in to comment.