|
@@ -13,3 +13,7 @@ describe 'ShexpUtils', ->
|
|
|
it 'should know the difference between escaped and unescaped slashes', ->
|
|
|
regex = ShexpUtils.escapeSlash '\\\\/\\/test\\/'
|
|
|
regex.should.equal '\\\\\\/\\/test\\/'
|
|
|
+ describe '#shExp2RegExp', ->
|
|
|
+ it 'should escape regex meta chars and back slashes', ->
|
|
|
+ regex = ShexpUtils.shExp2RegExp 'this.is|a\\test+'
|
|
|
+ regex.should.equal '^this\\.is\\|a\\\\test\\+$'
|