@@ -4007,4 +4007,100 @@ mod tests {
40074007 }
40084008 ) ;
40094009 }
4010+
4011+ #[ test]
4012+ fn test_word_break ( ) {
4013+ minify_test ( ".foo { word-break: normal }" , ".foo{word-break:normal}" ) ;
4014+ minify_test ( ".foo { word-break: keep-all }" , ".foo{word-break:keep-all}" ) ;
4015+ minify_test ( ".foo { word-break: break-all }" , ".foo{word-break:break-all}" ) ;
4016+ minify_test ( ".foo { word-break: break-word }" , ".foo{word-break:break-word}" ) ;
4017+ }
4018+
4019+ #[ test]
4020+ fn test_line_break ( ) {
4021+ minify_test ( ".foo { line-break: auto }" , ".foo{line-break:auto}" ) ;
4022+ minify_test ( ".foo { line-break: Loose }" , ".foo{line-break:loose}" ) ;
4023+ minify_test ( ".foo { line-break: anywhere }" , ".foo{line-break:anywhere}" ) ;
4024+ }
4025+
4026+ #[ test]
4027+ fn test_wrap ( ) {
4028+ minify_test ( ".foo { overflow-wrap: nOrmal }" , ".foo{overflow-wrap:normal}" ) ;
4029+ minify_test ( ".foo { overflow-wrap: break-Word }" , ".foo{overflow-wrap:break-word}" ) ;
4030+ minify_test ( ".foo { overflow-wrap: Anywhere }" , ".foo{overflow-wrap:anywhere}" ) ;
4031+ minify_test ( ".foo { word-wrap: Normal }" , ".foo{word-wrap:normal}" ) ;
4032+ minify_test ( ".foo { word-wrap: Break-wOrd }" , ".foo{word-wrap:break-word}" ) ;
4033+ minify_test ( ".foo { word-wrap: Anywhere }" , ".foo{word-wrap:anywhere}" ) ;
4034+ }
4035+
4036+ #[ test]
4037+ fn test_hyphens ( ) {
4038+ minify_test ( ".foo { hyphens: manual }" , ".foo{hyphens:manual}" ) ;
4039+ minify_test ( ".foo { hyphens: auto }" , ".foo{hyphens:auto}" ) ;
4040+ minify_test ( ".foo { hyphens: none }" , ".foo{hyphens:none}" ) ;
4041+ minify_test ( ".foo { -webkit-hyphens: manual }" , ".foo{-webkit-hyphens:manual}" ) ;
4042+ minify_test ( ".foo { -moz-hyphens: manual }" , ".foo{-moz-hyphens:manual}" ) ;
4043+ minify_test ( ".foo { -ms-hyphens: manual }" , ".foo{-ms-hyphens:manual}" ) ;
4044+ prefix_test (
4045+ ".foo{ hyphens: manual }" ,
4046+ indoc ! { r#"
4047+ .foo {
4048+ -webkit-hyphens: manual;
4049+ -moz-hyphens: manual;
4050+ -ms-hyphens: manual;
4051+ hyphens: manual;
4052+ }
4053+ "# } ,
4054+ Browsers {
4055+ safari : Some ( 14 << 16 ) ,
4056+ firefox : Some ( 40 << 16 ) ,
4057+ ie : Some ( 10 << 16 ) ,
4058+ ..Browsers :: default ( )
4059+ }
4060+ ) ;
4061+ prefix_test (
4062+ r#"
4063+ .foo {
4064+ -webkit-hyphens: manual;
4065+ -moz-hyphens: manual;
4066+ -ms-hyphens: manual;
4067+ hyphens: manual;
4068+ }
4069+ "# ,
4070+ indoc ! { r#"
4071+ .foo {
4072+ -webkit-hyphens: manual;
4073+ hyphens: manual;
4074+ }
4075+ "# } ,
4076+ Browsers {
4077+ safari : Some ( 14 << 16 ) ,
4078+ chrome : Some ( 88 << 16 ) ,
4079+ firefox : Some ( 88 << 16 ) ,
4080+ edge : Some ( 79 << 16 ) ,
4081+ ..Browsers :: default ( )
4082+ }
4083+ ) ;
4084+ prefix_test (
4085+ r#"
4086+ .foo {
4087+ -webkit-hyphens: manual;
4088+ -moz-hyphens: manual;
4089+ -ms-hyphens: manual;
4090+ hyphens: manual;
4091+ }
4092+ "# ,
4093+ indoc ! { r#"
4094+ .foo {
4095+ hyphens: manual;
4096+ }
4097+ "# } ,
4098+ Browsers {
4099+ chrome : Some ( 88 << 16 ) ,
4100+ firefox : Some ( 88 << 16 ) ,
4101+ edge : Some ( 79 << 16 ) ,
4102+ ..Browsers :: default ( )
4103+ }
4104+ ) ;
4105+ }
40104106}
0 commit comments