@@ -903,4 +903,49 @@ vows.describe('cleancss')
903
903
}
904
904
} )
905
905
} )
906
+ . addBatch ( {
907
+ 'batch processing with source maps' : binaryContext ( '-b ./test/fixtures-batch-7/partials/\\*\\*/*.css --source-map' , {
908
+ 'setup' : function ( ) {
909
+ execSync ( 'cp -fr test/fixtures test/fixtures-batch-7' ) ;
910
+ execSync ( 'rm -fr test/fixtures-batch-7/partials/extra/four.css' ) ;
911
+ execSync ( 'touch test/fixtures-batch-7/partials/extra/four.css' ) ;
912
+ } ,
913
+ 'does not raise an error' : function ( error , stdout , stderr ) {
914
+ assert . equal ( stderr , '' ) ;
915
+ } ,
916
+ 'creates source map files' : function ( ) {
917
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-7/partials/extra/three-min.css.map' ) ) ;
918
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-7/partials/one-min.css.map' ) ) ;
919
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-7/partials/two-min.css.map' ) ) ;
920
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-7/partials/quoted-svg-min.css.map' ) ) ;
921
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-7/partials/five-min.css.map' ) ) ;
922
+ } ,
923
+ 'teardown' : function ( ) {
924
+ execSync ( 'rm -fr test/fixtures-batch-7' ) ;
925
+ }
926
+ } )
927
+ } )
928
+ . addBatch ( {
929
+ 'batch processing with source maps and output as a path' : binaryContext ( '-b ./test/fixtures-batch-8/partials/\\*\\*/*.css --source-map -o test/fixtures-batch-8-output' , {
930
+ 'setup' : function ( ) {
931
+ execSync ( 'cp -fr test/fixtures test/fixtures-batch-8' ) ;
932
+ execSync ( 'rm -fr test/fixtures-batch-8/partials/extra/four.css' ) ;
933
+ execSync ( 'touch test/fixtures-batch-8/partials/extra/four.css' ) ;
934
+ } ,
935
+ 'does not raise an error' : function ( error , stdout , stderr ) {
936
+ assert . equal ( stderr , '' ) ;
937
+ } ,
938
+ 'creates source map files' : function ( ) {
939
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-8-output/extra/three-min.css.map' ) ) ;
940
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-8-output/one-min.css.map' ) ) ;
941
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-8-output/two-min.css.map' ) ) ;
942
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-8-output/quoted-svg-min.css.map' ) ) ;
943
+ assert . isTrue ( fs . existsSync ( 'test/fixtures-batch-8-output/five-min.css.map' ) ) ;
944
+ } ,
945
+ 'teardown' : function ( ) {
946
+ execSync ( 'rm -fr test/fixtures-batch-8' ) ;
947
+ execSync ( 'rm -fr test/fixtures-batch-8-output' ) ;
948
+ }
949
+ } )
950
+ } )
906
951
. export ( module ) ;
0 commit comments