[FIX] qweb: add some missing operators

closes #162
This commit is contained in:
Géry Debongnie
2019-06-11 10:32:00 +02:00
parent b3db085745
commit 438e2fbc2e
2 changed files with 11 additions and 2 deletions
+9
View File
@@ -39,6 +39,15 @@ describe("tokenizer", () => {
]);
});
test("various operators", () => {
expect(tokenize(">= <= < >")).toEqual([
{ type: "OPERATOR", value: ">=" },
{ type: "OPERATOR", value: "<=" },
{ type: "OPERATOR", value: "<" },
{ type: "OPERATOR", value: ">" },
]);
});
test("strings", () => {
expect(() => tokenize("'")).toThrow("Invalid expression");
expect(() => tokenize("'\\")).toThrow("Invalid expression");