@@ -66,4 +66,55 @@ describe("values", function() {
66
66
} ) ( )
67
67
}
68
68
) ;
69
+ testLocal ( "should import values contain comma with renaming" ,
70
+ "@value color from './file1'; @value shadow: 0 0 color,0 0 color; .ghi { box-shadow: shadow; }" , [
71
+ [ 2 , "" , "" ] ,
72
+ [ 1 , ".ghi { box-shadow: 0 0 red,0 0 red; }" , "" ]
73
+ ] , {
74
+ color : "red" ,
75
+ shadow : "0 0 red,0 0 red"
76
+ } , "" , {
77
+ "./file1" : ( function ( ) {
78
+ var a = [ [ 2 , "" , "" ] ] ;
79
+ a . locals = {
80
+ color : "red" ,
81
+ } ;
82
+ return a ;
83
+ } ) ( )
84
+ }
85
+ ) ;
86
+ testLocal ( "should import values contain comma and space before comma with renaming" ,
87
+ "@value color from './file1'; @value shadow: 0 0 color ,0 0 color; .ghi { box-shadow: shadow; }" , [
88
+ [ 2 , "" , "" ] ,
89
+ [ 1 , ".ghi { box-shadow: 0 0 red ,0 0 red; }" , "" ]
90
+ ] , {
91
+ color : "red" ,
92
+ shadow : "0 0 red ,0 0 red"
93
+ } , "" , {
94
+ "./file1" : ( function ( ) {
95
+ var a = [ [ 2 , "" , "" ] ] ;
96
+ a . locals = {
97
+ color : "red" ,
98
+ } ;
99
+ return a ;
100
+ } ) ( )
101
+ }
102
+ ) ;
103
+ testLocal ( "should import values contain tralling comma and space after comma with renaming" ,
104
+ "@value color from './file1'; @value shadow: 0 0 color, 0 0 color; .ghi { box-shadow: shadow; }" , [
105
+ [ 2 , "" , "" ] ,
106
+ [ 1 , ".ghi { box-shadow: 0 0 red, 0 0 red; }" , "" ]
107
+ ] , {
108
+ color : "red" ,
109
+ shadow : "0 0 red, 0 0 red"
110
+ } , "" , {
111
+ "./file1" : ( function ( ) {
112
+ var a = [ [ 2 , "" , "" ] ] ;
113
+ a . locals = {
114
+ color : "red" ,
115
+ } ;
116
+ return a ;
117
+ } ) ( )
118
+ }
119
+ ) ;
69
120
} ) ;
0 commit comments