@@ -65,7 +65,7 @@ describe('Test plugin selector localize', function() {
6565 expect ( ret ) . match ( / b o d y .n a v _ s p a c e _ .i t e m _ s p a c e _ / )
6666
6767 expect ( result . mapSel ( '.nav' ) ) . equal ( '.nav_space_' )
68- expect ( result . mapSel ( '.nav a[href=abc.html]' ) ) . equal ( '.nav_space_ a[href=abc.html]' )
68+ expect ( result . mapSel ( '.nav a[href=" abc.html" ]' ) ) . equal ( '.nav_space_ a[href=" abc.html" ]' )
6969
7070 expect ( result . mapSel ( '.item' ) ) . equal ( '.item_space_' )
7171
@@ -124,7 +124,7 @@ describe('Test plugin selector localize', function() {
124124
125125 /* since 2.1.0 below will not supported */
126126 // expect(ret).equal('@support (prefix=(._space_abc)), [xyz=._space_abc], url=(._space_abc)')
127- expect ( ret ) . equal ( '@support (prefix=(.abc )), [xyz=.abc ], url=(.abc )' )
127+ expect ( ret ) . equal ( '@support (prefix=(.abc_space_ )), [xyz=.abc_space_ ], url=(.abc_space_ )' )
128128
129129 } )
130130
@@ -156,7 +156,7 @@ describe('Test plugin selector localize', function() {
156156 var ret = loc ( '.nav a[title=".sdf].abc .!def"]' , { } , result )
157157 expect ( ret ) . equal ( '.nav_space_ a[title=".sdf].abc .!def"]' )
158158
159- expect ( result . mapSel ( '.item[.!xyz.abc.def]' ) ) . equal ( '.item_space_[.! xyz.abc.def ]' )
159+ expect ( result . mapSel ( '.item[.!xyz.abc.def]' ) ) . equal ( '.item_space_[.xyz.abc_space_.def_space_ ]' )
160160 } )
161161
162162 it ( 'should work right with ! symbol and localNames' , function ( ) {
@@ -219,4 +219,14 @@ describe('Test plugin selector localize', function() {
219219
220220 } )
221221
222+
223+ it ( 'should mapClass within ()' , ( ) => {
224+ var loc = lib ( { space :'_space_' } ) . selector
225+ var result = { }
226+
227+ var ret = loc ( `.a:not(.b,.c),div[x=".a,a\\"b,.b"],p` , { } , result )
228+ expect ( ret ) . equal ( '.a_space_:not(.b_space_,.c_space_),div[x=".a,a\\"b,.b"],p' )
229+
230+ } )
231+
222232} )
0 commit comments