@@ -1297,9 +1297,9 @@ fn fix_to_broken_code() {
1297
1297
. with_stderr_contains ( "[WARNING] failed to automatically apply fixes [..]" )
1298
1298
. run ( ) ;
1299
1299
1300
- assert_eq ! (
1300
+ assert_e2e ( ) . eq (
1301
1301
p. read_file ( "bar/src/lib.rs" ) ,
1302
- "pub fn foo() { let x = 3; let _ = x; }"
1302
+ str! [ "pub fn foo() { let x = 3; let _ = x; }" ] ,
1303
1303
) ;
1304
1304
}
1305
1305
@@ -1320,7 +1320,10 @@ fn fix_with_common() {
1320
1320
1321
1321
p. cargo ( "fix --edition --allow-no-vcs" ) . run ( ) ;
1322
1322
1323
- assert_eq ! ( p. read_file( "tests/common/mod.rs" ) , "pub fn r#try() {}" ) ;
1323
+ assert_e2e ( ) . eq (
1324
+ p. read_file ( "tests/common/mod.rs" ) ,
1325
+ str![ "pub fn r#try() {}" ] ,
1326
+ ) ;
1324
1327
}
1325
1328
1326
1329
#[ cargo_test]
@@ -2312,9 +2315,10 @@ edition = "2021"
2312
2315
" ,
2313
2316
)
2314
2317
. run ( ) ;
2315
- assert_eq ! (
2318
+ assert_e2e ( ) . eq (
2316
2319
p. read_file ( "Cargo.toml" ) ,
2317
- r#"
2320
+ str![ [ r#"
2321
+
2318
2322
cargo-features = ["edition2024"]
2319
2323
2320
2324
# Before project
@@ -2323,7 +2327,8 @@ cargo-features = ["edition2024"]
2323
2327
name = "foo"
2324
2328
edition = "2021"
2325
2329
# After project table
2326
- "#
2330
+
2331
+ "# ] ] ,
2327
2332
) ;
2328
2333
}
2329
2334
@@ -2365,9 +2370,10 @@ edition = "2021"
2365
2370
" ,
2366
2371
)
2367
2372
. run ( ) ;
2368
- assert_eq ! (
2373
+ assert_e2e ( ) . eq (
2369
2374
p. read_file ( "Cargo.toml" ) ,
2370
- r#"
2375
+ str![ [ r#"
2376
+
2371
2377
cargo-features = ["edition2024"]
2372
2378
2373
2379
# Before package
@@ -2376,7 +2382,8 @@ cargo-features = ["edition2024"]
2376
2382
name = "foo"
2377
2383
edition = "2021"
2378
2384
# After project table
2379
- "#
2385
+
2386
+ "# ] ] ,
2380
2387
) ;
2381
2388
}
2382
2389
@@ -2469,9 +2476,10 @@ a = {path = "a", default_features = false}
2469
2476
" ,
2470
2477
)
2471
2478
. run ( ) ;
2472
- assert_eq ! (
2479
+ assert_e2e ( ) . eq (
2473
2480
p. read_file ( "Cargo.toml" ) ,
2474
- r#"
2481
+ str![ [ r#"
2482
+
2475
2483
cargo-features = ["edition2024"]
2476
2484
2477
2485
[workspace.dependencies]
@@ -2519,7 +2527,8 @@ a = {path = "a", default-features = false}
2519
2527
# After build_dependencies line
2520
2528
a = {path = "a", default-features = false}
2521
2529
# After build_dependencies table
2522
- "# ,
2530
+
2531
+ "# ] ] ,
2523
2532
) ;
2524
2533
}
2525
2534
@@ -2564,9 +2573,10 @@ target-dep = { version = "0.1.0", optional = true }
2564
2573
" ,
2565
2574
)
2566
2575
. run ( ) ;
2567
- assert_eq ! (
2576
+ assert_e2e ( ) . eq (
2568
2577
p. read_file ( "Cargo.toml" ) ,
2569
- r#"
2578
+ str![ [ r#"
2579
+
2570
2580
[package]
2571
2581
name = "foo"
2572
2582
version = "0.1.0"
@@ -2585,7 +2595,8 @@ target-dep = { version = "0.1.0", optional = true }
2585
2595
bar = ["dep:bar"]
2586
2596
baz = ["dep:baz"]
2587
2597
target-dep = ["dep:target-dep"]
2588
- "#
2598
+
2599
+ "# ] ] ,
2589
2600
) ;
2590
2601
}
2591
2602
@@ -2633,9 +2644,10 @@ target-dep = ["dep:target-dep"]
2633
2644
" ,
2634
2645
)
2635
2646
. run ( ) ;
2636
- assert_eq ! (
2647
+ assert_e2e ( ) . eq (
2637
2648
p. read_file ( "Cargo.toml" ) ,
2638
- r#"
2649
+ str![ [ r#"
2650
+
2639
2651
[package]
2640
2652
name = "foo"
2641
2653
version = "0.1.0"
@@ -2654,7 +2666,8 @@ target-dep = { version = "0.1.0", optional = true }
2654
2666
target-dep = ["dep:target-dep"]
2655
2667
bar = ["dep:bar"]
2656
2668
baz = ["dep:baz"]
2657
- "#
2669
+
2670
+ "# ] ] ,
2658
2671
) ;
2659
2672
}
2660
2673
@@ -2777,11 +2790,12 @@ dep_df_false = { version = "0.1.0", default-features = false }
2777
2790
)
2778
2791
. run ( ) ;
2779
2792
2780
- assert_eq ! ( p. read_file( "pkg_default/Cargo.toml" ) , pkg_default) ;
2781
- assert_eq ! ( p. read_file( "pkg_df_true/Cargo.toml" ) , pkg_df_true) ;
2782
- assert_eq ! (
2793
+ assert_e2e ( ) . eq ( p. read_file ( "pkg_default/Cargo.toml" ) , pkg_default) ;
2794
+ assert_e2e ( ) . eq ( p. read_file ( "pkg_df_true/Cargo.toml" ) , pkg_df_true) ;
2795
+ assert_e2e ( ) . eq (
2783
2796
p. read_file ( "pkg_df_false/Cargo.toml" ) ,
2784
- r#"
2797
+ str![ [ r#"
2798
+
2785
2799
[package]
2786
2800
name = "pkg_df_false"
2787
2801
version = "0.1.0"
@@ -2801,6 +2815,7 @@ dep_df_false = { workspace = true, default-features = false }
2801
2815
dep_simple = { workspace = true}
2802
2816
dep_df_true = { workspace = true}
2803
2817
dep_df_false = { workspace = true, default-features = false }
2804
- "#
2818
+
2819
+ "# ] ] ,
2805
2820
) ;
2806
2821
}
0 commit comments