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