feature/igc3 f337f920603 1/2: * test/src/json-tests.el (json-tests-big-array): New test.
Helmut Eller <[email protected]>
| Newsgroups | gmane.emacs.diffs |
|---|---|
| Message-ID | <[email protected]> |
branch: feature/igc3 commit f337f9206037a11adc3090c86b0bbda54acd1065 Author: Helmut Eller <[email protected]> Commit: Helmut Eller <[email protected]> * test/src/json-tests.el (json-tests-big-array): New test. --- test/src/json-tests.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/src/json-tests.el b/test/src/json-tests.el index ec079f020bd..dd903bf21d8 100644 --- a/test/src/json-tests.el +++ b/test/src/json-tests.el @@ -453,5 +453,19 @@ See also `with-temp-buffer'." (goto-char (1+ (length junk))) (should (equal (json-tests--parse-buffer-error-pos) 16)))))) +(ert-deftest json-tests-big-array () + ;; this calls json_make_object_workspace_for_slow_path (bug#81283) + (with-temp-buffer + (let ((len 10000)) + (insert "[") + (dotimes (i len) + (when (> i 0) + (insert ",")) + (insert "true")) + (insert "]") + (goto-char 1) + (should (equal (json-parse-buffer) + (make-vector len t)))))) + (provide 'json-tests) ;;; json-tests.el ends here