@@ -337,7 +337,7 @@ mod tests {
337337 .foo {
338338 border: none;
339339 }
340- "# , indoc ! { ".foo{border:0; }"
340+ "# , indoc ! { ".foo{border:0}"
341341 } ) ;
342342 }
343343
@@ -676,7 +676,7 @@ mod tests {
676676 .foo {
677677 background-position: center center;
678678 }
679- "# , indoc ! { ".foo{background-position:50% 50%; }"
679+ "# , indoc ! { ".foo{background-position:50% 50%}"
680680 } ) ;
681681 }
682682
@@ -948,4 +948,76 @@ mod tests {
948948 "#
949949 } ) ;
950950 }
951+
952+ #[ test]
953+ fn test_font ( ) {
954+ test ( r#"
955+ .foo {
956+ font-family: "Helvetica", "Times New Roman", sans-serif;
957+ font-size: 12px;
958+ font-weight: bold;
959+ font-style: italic;
960+ font-stretch: expanded;
961+ font-variant-caps: small-caps;
962+ line-height: 1.2em;
963+ }
964+ "# , indoc ! { r#"
965+ .foo {
966+ font: italic small-caps bold expanded 12px / 1.2em Helvetica, Times New Roman, sans-serif;
967+ }
968+ "#
969+ } ) ;
970+
971+ minify_test ( r#"
972+ .foo {
973+ font-family: "Helvetica", "Times New Roman", sans-serif;
974+ font-size: 12px;
975+ font-weight: bold;
976+ font-style: italic;
977+ font-stretch: expanded;
978+ font-variant-caps: small-caps;
979+ line-height: 1.2em;
980+ }
981+ "# , indoc ! { ".foo{font:italic small-caps 700 50% 12px/1.2em Helvetica,Times New Roman,sans-serif}"
982+ } ) ;
983+
984+ test ( r#"
985+ .foo {
986+ font: 12px "Helvetica", "Times New Roman", sans-serif;
987+ line-height: 1.2em;
988+ }
989+ "# , indoc ! { r#"
990+ .foo {
991+ font: 12px / 1.2em Helvetica, Times New Roman, sans-serif;
992+ }
993+ "#
994+ } ) ;
995+
996+ minify_test ( r#"
997+ .foo {
998+ font-family: "Helvetica", "Times New Roman", sans-serif;
999+ font-size: 12px;
1000+ font-stretch: expanded;
1001+ }
1002+ "# , indoc ! { ".foo{font-family:Helvetica,Times New Roman,sans-serif;font-size:12px;font-stretch:50%}"
1003+ } ) ;
1004+
1005+ test ( r#"
1006+ .foo {
1007+ font-family: "Helvetica", "Times New Roman", sans-serif;
1008+ font-size: 12px;
1009+ font-weight: bold;
1010+ font-style: italic;
1011+ font-stretch: expanded;
1012+ font-variant-caps: all-small-caps;
1013+ line-height: 1.2em;
1014+ }
1015+ "# , indoc ! { r#"
1016+ .foo {
1017+ font: italic bold expanded 12px / 1.2em Helvetica, Times New Roman, sans-serif;
1018+ font-variant-caps: all-small-caps;
1019+ }
1020+ "#
1021+ } ) ;
1022+ }
9511023}
0 commit comments