From 9ed05410a3365dc1e01bbf538ab39b34e85fe299 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Tue, 5 Dec 2017 17:45:19 +0900 Subject: [PATCH] Add more tests --- tests/source/remove_blank_lines.rs | 22 ++++++++++++++++++++++ tests/target/remove_blank_lines.rs | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/tests/source/remove_blank_lines.rs b/tests/source/remove_blank_lines.rs index 377843cbc8b..7466e21eed8 100644 --- a/tests/source/remove_blank_lines.rs +++ b/tests/source/remove_blank_lines.rs @@ -6,10 +6,16 @@ fn main() { let x = 1; + let y = 2; + + + println!("x + y = {}", x + y); + } + fn foo() { #![attribute] @@ -20,3 +26,19 @@ fn foo() { } +// comment after item + + +// comment before item +fn bar() { + let x = 1; + // comment after statement + + + // comment before statment + let y = 2; + let z = 3; + + + println!("x + y + z = {}", x + y + z); +} diff --git a/tests/target/remove_blank_lines.rs b/tests/target/remove_blank_lines.rs index 00de4a829f2..89b18e40b83 100644 --- a/tests/target/remove_blank_lines.rs +++ b/tests/target/remove_blank_lines.rs @@ -1,5 +1,9 @@ fn main() { let x = 1; + + let y = 2; + + println!("x + y = {}", x + y); } fn foo() { @@ -9,3 +13,16 @@ fn foo() { // comment } +// comment after item + +// comment before item +fn bar() { + let x = 1; + // comment after statement + + // comment before statment + let y = 2; + let z = 3; + + println!("x + y + z = {}", x + y + z); +} -- 2.44.0