[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 66d69cb 39/45: js2-test-parse-string: Compare the first sy
From: |
Dmitry Gutov |
Subject: |
[elpa] master 66d69cb 39/45: js2-test-parse-string: Compare the first syntax error |
Date: |
Mon, 02 Feb 2015 03:18:49 +0000 |
branch: master
commit 66d69cb888f7b2fbd096f288aebe852d51a97130
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
js2-test-parse-string: Compare the first syntax error
---
tests/parser.el | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/parser.el b/tests/parser.el
index 553200e..b4f2d8f 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -48,7 +48,7 @@
(if syntax-error
(let ((errors (js2-ast-root-errors ast)))
(should (= (or errors-count 1) (length errors)))
- (cl-destructuring-bind (_ pos len) (cl-first errors)
+ (cl-destructuring-bind (_ pos len) (car (last errors))
(should (string= syntax-error (substring code-string
(1- pos) (+ pos len
-1))))))
(should (= 0 (length (js2-ast-root-errors ast))))
@@ -184,7 +184,7 @@ the test."
"var x = {a: 1, b, c: 1, d};")
(js2-deftest-parse object-literal-shorthard-with-number
- "var a = {1};" :syntax-error ";" :errors-count 2)
+ "var a = {1};" :syntax-error "}" :errors-count 2)
(js2-deftest-parse object-literal-method
"var x = {f(y) { return y;\n}};")
@@ -255,13 +255,13 @@ the test."
"([{a}, b]) => { a + b;\n};")
(js2-deftest-parse parenless-arrow-function-prohibits-rest
- "...b => {b + 1;};" :syntax-error "=>" :errors-count 1)
+ "...b => {b + 1;};" :syntax-error "=>")
(js2-deftest-parse parenless-arrow-function-prohibits-destructuring
- "[a, b] => {a + b;};" :syntax-error "=>" :errors-count 4)
+ "[a, b] => {a + b;};" :syntax-error "]" :errors-count 4)
(js2-deftest-parse arrow-function-recovers-from-error
- "[(,foo) => 1];" :syntax-error "=>" :errors-count 6)
+ "[(,foo) => 1];" :syntax-error "," :errors-count 6)
;;; Automatic semicolon insertion
- [elpa] master b0ea681 33/45: Add animationFrame functions, (continued)
- [elpa] master b0ea681 33/45: Add animationFrame functions, Dmitry Gutov, 2015/02/01
- [elpa] master 590db34 37/45: js2-parse-class-stmt: Define the class in the current scope, Dmitry Gutov, 2015/02/01
- [elpa] master ba564b7 38/45: Handle arrowfun empty-args in js2-parse-paren-expr-or-generator-comp, Dmitry Gutov, 2015/02/01
- [elpa] master 874cf77 31/45: js2-get-token-internal-1: Reindent, Dmitry Gutov, 2015/02/01
- [elpa] master 58c6636 27/45: Support ES6 module syntax, Dmitry Gutov, 2015/02/01
- [elpa] master b91f874 34/45: Merge pull request #202 from brianloveswords/add-browser-externs, Dmitry Gutov, 2015/02/01
- [elpa] master f0935fa 42/45: Add top-level heading, Dmitry Gutov, 2015/02/01
- [elpa] master 7558a96 44/45: Bump the version and update NEWS, Dmitry Gutov, 2015/02/01
- [elpa] master bc42697 40/45: Fix free variable references, Dmitry Gutov, 2015/02/01
- [elpa] master a018a79 43/45: Highlight JS snippets, Dmitry Gutov, 2015/02/01
- [elpa] master 66d69cb 39/45: js2-test-parse-string: Compare the first syntax error,
Dmitry Gutov <=
- [elpa] master b67d97b 41/45: Move the news from the wiki to the repo, Dmitry Gutov, 2015/02/01
- [elpa] master dedfa35 28/45: Replace usage of 'cl with 'cl-lib, Dmitry Gutov, 2015/02/01
- [elpa] master f655a55 30/45: Merge pull request #191 from purcell/cl-lib, Dmitry Gutov, 2015/02/01
- [elpa] master a1ac1e0 45/45: Merge commit '7558a961a03b3a9d26fafc69d9665e4aadf47738' from js2-mode, Dmitry Gutov, 2015/02/01