소스 검색

Slash escaping test

simnv 9 년 전
부모
커밋
dd5b4a25d1
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      public/test/specs/templateSrv-specs.js

+ 5 - 0
public/test/specs/templateSrv-specs.js

@@ -135,6 +135,11 @@ define([
         expect(result).to.be('test|test2');
       });
 
+      it('slash should be properly escaped in regex format', function() {
+         var result = _templateSrv.formatValue('Gi3/14', 'regex');
+         expect(result).to.be('Gi3\\/14');
+      });
+
     });
 
     describe('can check if variable exists', function() {