File tree Expand file tree Collapse file tree
crates/trusted-server-core/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -776,8 +776,14 @@ mod tests {
776776 ) ;
777777
778778 // Verify HTML structure
779- assert_eq ! ( & result[ 0 ..15 ] , "<!DOCTYPE html>" ) ;
780- assert_eq ! ( & result[ result. len( ) - 7 ..] , "</html>" ) ;
779+ assert ! (
780+ result. starts_with( "<!DOCTYPE html>" ) ,
781+ "Should preserve doctype"
782+ ) ;
783+ assert ! (
784+ result. trim_end( ) . ends_with( "</html>" ) ,
785+ "Should preserve closing html tag"
786+ ) ;
781787
782788 // Verify content preservation
783789 assert ! (
@@ -907,8 +913,14 @@ mod tests {
907913 ) ;
908914
909915 // Verify structure
910- assert_eq ! ( & decompressed[ 0 ..15 ] , "<!DOCTYPE html>" ) ;
911- assert_eq ! ( & decompressed[ decompressed. len( ) - 7 ..] , "</html>" ) ;
916+ assert ! (
917+ decompressed. starts_with( "<!DOCTYPE html>" ) ,
918+ "Should preserve doctype"
919+ ) ;
920+ assert ! (
921+ decompressed. trim_end( ) . ends_with( "</html>" ) ,
922+ "Should preserve closing html tag"
923+ ) ;
912924
913925 // Verify content preservation
914926 assert ! (
You can’t perform that action at this time.
0 commit comments