@@ -779,8 +779,14 @@ async fn replace_symbol_works_for_python() {
779779 . unwrap ( ) ;
780780
781781 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.py" ) ) . unwrap ( ) ;
782- assert ! ( result. contains( "'new'" ) , "new body must be present; got:\n {result}" ) ;
783- assert ! ( !result. contains( "'old'" ) , "old body must be gone; got:\n {result}" ) ;
782+ assert ! (
783+ result. contains( "'new'" ) ,
784+ "new body must be present; got:\n {result}"
785+ ) ;
786+ assert ! (
787+ !result. contains( "'old'" ) ,
788+ "old body must be gone; got:\n {result}"
789+ ) ;
784790}
785791
786792/// TypeScript: `function` was not in the Rust keyword allowlist → old code rejected it.
@@ -806,8 +812,14 @@ async fn replace_symbol_works_for_typescript() {
806812 . unwrap ( ) ;
807813
808814 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.ts" ) ) . unwrap ( ) ;
809- assert ! ( result. contains( "'new'" ) , "new body must be present; got:\n {result}" ) ;
810- assert ! ( !result. contains( "'old'" ) , "old body must be gone; got:\n {result}" ) ;
815+ assert ! (
816+ result. contains( "'new'" ) ,
817+ "new body must be present; got:\n {result}"
818+ ) ;
819+ assert ! (
820+ !result. contains( "'old'" ) ,
821+ "old body must be gone; got:\n {result}"
822+ ) ;
811823}
812824
813825/// JavaScript: `function` keyword → same Rust-allowlist rejection as TypeScript.
@@ -830,8 +842,14 @@ async fn replace_symbol_works_for_javascript() {
830842 . unwrap ( ) ;
831843
832844 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.js" ) ) . unwrap ( ) ;
833- assert ! ( result. contains( "'new'" ) , "new body must be present; got:\n {result}" ) ;
834- assert ! ( !result. contains( "'old'" ) , "old body must be gone; got:\n {result}" ) ;
845+ assert ! (
846+ result. contains( "'new'" ) ,
847+ "new body must be present; got:\n {result}"
848+ ) ;
849+ assert ! (
850+ !result. contains( "'old'" ) ,
851+ "old body must be gone; got:\n {result}"
852+ ) ;
835853}
836854
837855/// Go: `func` was not in the Rust keyword allowlist → old code rejected it.
@@ -854,8 +872,14 @@ async fn replace_symbol_works_for_go() {
854872 . unwrap ( ) ;
855873
856874 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.go" ) ) . unwrap ( ) ;
857- assert ! ( result. contains( "\" new\" " ) , "new body must be present; got:\n {result}" ) ;
858- assert ! ( !result. contains( "\" old\" " ) , "old body must be gone; got:\n {result}" ) ;
875+ assert ! (
876+ result. contains( "\" new\" " ) ,
877+ "new body must be present; got:\n {result}"
878+ ) ;
879+ assert ! (
880+ !result. contains( "\" old\" " ) ,
881+ "old body must be gone; got:\n {result}"
882+ ) ;
859883}
860884
861885/// Java: `public` at the start of a method was not in the allowlist → rejected.
@@ -879,8 +903,14 @@ async fn replace_symbol_works_for_java() {
879903 . unwrap ( ) ;
880904
881905 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "Greet.java" ) ) . unwrap ( ) ;
882- assert ! ( result. contains( "\" new\" " ) , "new body must be present; got:\n {result}" ) ;
883- assert ! ( !result. contains( "\" old\" " ) , "old body must be gone; got:\n {result}" ) ;
906+ assert ! (
907+ result. contains( "\" new\" " ) ,
908+ "new body must be present; got:\n {result}"
909+ ) ;
910+ assert ! (
911+ !result. contains( "\" old\" " ) ,
912+ "old body must be gone; got:\n {result}"
913+ ) ;
884914}
885915
886916/// Kotlin: `fun` was not in the Rust keyword allowlist → old code rejected it.
@@ -903,8 +933,14 @@ async fn replace_symbol_works_for_kotlin() {
903933 . unwrap ( ) ;
904934
905935 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "Greet.kt" ) ) . unwrap ( ) ;
906- assert ! ( result. contains( "\" new\" " ) , "new body must be present; got:\n {result}" ) ;
907- assert ! ( !result. contains( "\" old\" " ) , "old body must be gone; got:\n {result}" ) ;
936+ assert ! (
937+ result. contains( "\" new\" " ) ,
938+ "new body must be present; got:\n {result}"
939+ ) ;
940+ assert ! (
941+ !result. contains( "\" old\" " ) ,
942+ "old body must be gone; got:\n {result}"
943+ ) ;
908944}
909945
910946/// C: return-type-first signatures were not in the Rust keyword allowlist → rejected.
@@ -927,8 +963,14 @@ async fn replace_symbol_works_for_c() {
927963 . unwrap ( ) ;
928964
929965 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.c" ) ) . unwrap ( ) ;
930- assert ! ( result. contains( "return 1" ) , "new body must be present; got:\n {result}" ) ;
931- assert ! ( !result. contains( "return 0" ) , "old body must be gone; got:\n {result}" ) ;
966+ assert ! (
967+ result. contains( "return 1" ) ,
968+ "new body must be present; got:\n {result}"
969+ ) ;
970+ assert ! (
971+ !result. contains( "return 0" ) ,
972+ "old body must be gone; got:\n {result}"
973+ ) ;
932974}
933975
934976/// C++: same as C — return-type-first → rejected by old allowlist.
@@ -951,8 +993,14 @@ async fn replace_symbol_works_for_cpp() {
951993 . unwrap ( ) ;
952994
953995 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.cpp" ) ) . unwrap ( ) ;
954- assert ! ( result. contains( "\" new\" " ) , "new body must be present; got:\n {result}" ) ;
955- assert ! ( !result. contains( "\" old\" " ) , "old body must be gone; got:\n {result}" ) ;
996+ assert ! (
997+ result. contains( "\" new\" " ) ,
998+ "new body must be present; got:\n {result}"
999+ ) ;
1000+ assert ! (
1001+ !result. contains( "\" old\" " ) ,
1002+ "old body must be gone; got:\n {result}"
1003+ ) ;
9561004}
9571005
9581006/// Ruby: `def` (without parens) was not in the Rust keyword allowlist → rejected.
@@ -979,6 +1027,12 @@ async fn replace_symbol_works_for_ruby() {
9791027 . unwrap ( ) ;
9801028
9811029 let result = std:: fs:: read_to_string ( dir. path ( ) . join ( "greet.rb" ) ) . unwrap ( ) ;
982- assert ! ( result. contains( "'new'" ) , "new body must be present; got:\n {result}" ) ;
983- assert ! ( !result. contains( "'old'" ) , "old body must be gone; got:\n {result}" ) ;
1030+ assert ! (
1031+ result. contains( "'new'" ) ,
1032+ "new body must be present; got:\n {result}"
1033+ ) ;
1034+ assert ! (
1035+ !result. contains( "'old'" ) ,
1036+ "old body must be gone; got:\n {result}"
1037+ ) ;
9841038}
0 commit comments