Fix escaping of regular expressions in VC builder
Change-Id: I172c83fcb7ebb0943b23106891c57aeadca0a1f8
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 3159101..24b24a7 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -323,15 +323,20 @@
expect(doc.toQuery()).toEqual('title = /[^b]ee.+?/');
doc = regexFactory.create({
- match: "match:ne"
+ match: "match:ne"
});
expect(doc.toQuery()).toEqual('title != /[^b]ee.+?/');
+ doc = regexFactory.create({
+ value: "WPD/AAA/00001"
+ });
+ expect(doc.toQuery()).toEqual('title = /WPD\\/AAA\\/00001/');
+
doc = dateFactory.create();
expect(doc.toQuery()).toEqual('pubDate in 2014-11-05');
doc = dateFactory.create({
- value : "2014"
+ value : "2014"
});
expect(doc.toQuery()).toEqual('pubDate in 2014');
});