Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail test on Emacs 25 json-reformat-test:json-reformat-region-occur-error and json-reformat-test:string-to-string #33

Closed
wigust opened this issue Dec 3, 2017 · 1 comment

Comments

@wigust
Copy link

wigust commented Dec 3, 2017

Hello, Some tests fail on Emacs 25 (unlike on version 24).

Running 10 tests (2017-12-03 17:16:26+0300)
   passed   1/10  json-reformat-test:indent
   passed   2/10  json-reformat-test:json-reformat-region
Test json-reformat-test:json-reformat-region-occur-error backtrace:
  (if (unwind-protect (setq value-152 (apply fn-150 args-151)) (setq f
  (let (form-description-154) (if (unwind-protect (setq value-152 (app
  (let ((value-152 (quote ert-form-evaluation-aborted-153))) (let (for
  (let ((fn-150 (function string=)) (args-151 (list "JSON parse error 
  (progn (fset (quote message) vnew) (let ((temp-buffer (generate-new-
  (unwind-protect (progn (fset (quote message) vnew) (let ((temp-buffe
  (let* ((vnew (function (lambda (&rest args) (setq message-string (ap
  (let (message-string) (let* ((vnew (function (lambda (&rest args) (s
  (lambda nil (let (message-string) (let* ((vnew (function (lambda (&r
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  ert-run-test([cl-struct-ert-test json-reformat-test:json-reformat-re
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test j
  ert-run-tests(t #[385 "\306�\307\"\203G�\211\211G\310U\203��\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-L" "." "-l" "json-reformat.el" "-l" "test/json-ref
  command-line()
  normal-top-level()
Test json-reformat-test:json-reformat-region-occur-error condition:
    (ert-test-failed
     ((should
       (string= "JSON parse error [Reason] Bad string format: \"doesn't start with '\\\"'!\" [Position] In buffer, line 3 (char 6)" message-string))
      :form
      (string= "JSON parse error [Reason] Bad string format: \"doesn't start with '\\\"'!\" [Position] In buffer, line 3 (char 6)" "JSON parse error [Reason] Bad string format: \"doesn't start with `\\\"'!\" [Position] In buffer, line 3 (char 6)")
      :value nil))
   FAILED   3/10  json-reformat-test:json-reformat-region-occur-error
   passed   4/10  json-reformat-test:number-to-string
   passed   5/10  json-reformat-test:print-node
Test json-reformat-test:string-to-string backtrace:
  (if (unwind-protect (setq value-92 (apply fn-90 args-91)) (setq form
  (let (form-description-94) (if (unwind-protect (setq value-92 (apply
  (let ((value-92 (quote ert-form-evaluation-aborted-93))) (let (form-
  (let ((fn-90 (function string=)) (args-91 (list "\"\\u2661\"" (json-
  (lambda nil (let ((fn-80 (function string=)) (args-81 (list "\"fooba
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
  ert-run-test([cl-struct-ert-test json-reformat-test:string-to-string
  ert-run-or-rerun-test([cl-struct-ert--stats t [[cl-struct-ert-test j
  ert-run-tests(t #[385 "\306�\307\"\203G�\211\211G\310U\203��\211@\20
  ert-run-tests-batch(nil)
  ert-run-tests-batch-and-exit()
  command-line-1(("-L" "." "-l" "json-reformat.el" "-l" "test/json-ref
  command-line()
  normal-top-level()
Test json-reformat-test:string-to-string condition:
    (ert-test-failed
     ((should
       (string= "\"\\u2661\""
		(json-reformat:string-to-string "♡")))
      :form
      (string= "\"\\u2661\"" "\"♡\"")
      :value nil))
   FAILED   6/10  json-reformat-test:string-to-string
   passed   7/10  json-reformat-test:string-to-string-when-pretty
   passed   8/10  json-reformat-test:symbol-to-string
   passed   9/10  json-reformat-test:tree-to-string
   passed  10/10  json-reformat-test:vector-to-string

Ran 10 tests, 8 results as expected, 2 unexpected (2017-12-03 17:16:26+0300)

2 unexpected results:
   FAILED  json-reformat-test:json-reformat-region-occur-error
   FAILED  json-reformat-test:string-to-string
@gongo
Copy link
Owner

gongo commented Mar 27, 2018

Hi @wigust , sorry for replying late.
And I don't have the time for fix this failure for now 🙇

Tests fails, but I think it will work.
If you are concerned, use json-pretty-print and json-pretty-print-buffer.

@gongo gongo closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants