Skip to content

Commit 2487fd6

Browse files
author
Raphael Sofaer
committed
Minimal reproduction for whitespace being deleted with --verus-only
1 parent beff2fa commit 2487fd6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#[test]
2+
fn verus_only_extra_line() {
3+
let file = r"
4+
// The newline below this comment is deleted with --verus-only.
5+
6+
use std::marker::PhantomData;
7+
8+
pub fn main(){ } // Formatting error here pops up without --verus-only
9+
";
10+
let mut config = verusfmt::RunOptions::default();
11+
// Currently the only effect of the verus-only command line argument
12+
// is to set config.run_rustfmt to false, so use that.
13+
config.run_rustfmt = false;
14+
let formatted = verusfmt::run(file, config).unwrap();
15+
assert_eq!(formatted, file);
16+
17+
}

0 commit comments

Comments
 (0)