@@ -375,6 +375,27 @@ func TestNumber(t *testing.T) {
375375 }
376376}
377377
378+ func TestURL (t * testing.T ) {
379+ expectPrinted (t , "a { background: url(foo.png) }" , "a {\n background: url(foo.png);\n }\n " , "" )
380+ expectPrinted (t , "a { background: url('foo.png') }" , "a {\n background: url(foo.png);\n }\n " , "" )
381+ expectPrinted (t , "a { background: url(\" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
382+ expectPrinted (t , "a { background: url(\" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
383+ expectPrinted (t , "a { background: url(\" foo.png\" \t ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
384+ expectPrinted (t , "a { background: url(\" foo.png\" \r ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
385+ expectPrinted (t , "a { background: url(\" foo.png\" \n ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
386+ expectPrinted (t , "a { background: url(\" foo.png\" \f ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
387+ expectPrinted (t , "a { background: url(\" foo.png\" \r \n ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
388+ expectPrinted (t , "a { background: url( \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
389+ expectPrinted (t , "a { background: url(\t \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
390+ expectPrinted (t , "a { background: url(\r \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
391+ expectPrinted (t , "a { background: url(\n \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
392+ expectPrinted (t , "a { background: url(\f \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
393+ expectPrinted (t , "a { background: url(\r \n \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
394+ expectPrinted (t , "a { background: url( \" foo.png\" ) }" , "a {\n background: url(foo.png);\n }\n " , "" )
395+ expectPrinted (t , "a { background: url(\" foo.png\" extra-stuff) }" , "a {\n background: url(\" foo.png\" extra-stuff);\n }\n " , "" )
396+ expectPrinted (t , "a { background: url( \" foo.png\" extra-stuff ) }" , "a {\n background: url(\" foo.png\" extra-stuff);\n }\n " , "" )
397+ }
398+
378399func TestHexColor (t * testing.T ) {
379400 // "#RGBA"
380401
0 commit comments