fix existing tags

new tags: for,cycle
This commit is contained in:
harttle
2016-06-17 08:39:23 +08:00
parent 8b9e9f759a
commit 0b7da2abf7
24 changed files with 432 additions and 195 deletions
+6 -11
View File
@@ -17,6 +17,12 @@ describe('identifier', function() {
identifier.isLiteral('23').should.equal(true);
});
it("should test range literal", function() {
identifier.isRange("(12..32)").should.equal(true);
identifier.isRange("(12..foo)").should.equal(true);
identifier.isRange("(foo.bar..foo)").should.equal(true);
});
it('should test string literal', function() {
identifier.isLiteral('""').should.equal(true);
identifier.isLiteral('"a\'b"').should.equal(true);
@@ -24,10 +30,6 @@ describe('identifier', function() {
identifier.isLiteral("'a bcd'").should.equal(true);
});
it("should test range literal", function() {
identifier.isLiteral("(12..32)").should.equal(true);
});
it("should test variable", function() {
identifier.isVariable("foo").should.equal(true);
identifier.isVariable("foo.bar.foo").should.equal(true);
@@ -65,11 +67,4 @@ describe('identifier', function() {
identifier.parseLiteral('"ab\'c"').should.equal("ab\'c");
});
it("should parse range literal", function() {
var arr = identifier.parseLiteral("(12..32)");
arr.length.should.equal(20);
arr[0].should.equal(12);
arr[1].should.equal(13);
arr[19].should.equal(31);
});
});