bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63481: 29.0.90; src/treesit-tests fail in treesit-basic-parsing


From: Eli Zaretskii
Subject: bug#63481: 29.0.90; src/treesit-tests fail in treesit-basic-parsing
Date: Sat, 13 May 2023 09:40:28 +0300

To reproduce:

  $ cd test
  $ make src/treesit-tests SELECTOR='treesit-basic-parsing'

This results in:

    GEN      src/treesit-tests.log
  make[1]: Entering directory `/d/gnu/git/emacs/branch/test'
  Running 1 tests (2023-05-13 09:36:51+0300, selector `treesit-basic-parsing')
  Test treesit-basic-parsing backtrace:
    signal(ert-test-failed (((should (equal (treesit-node-string (treesi
    ert-fail(((should (equal (treesit-node-string (treesit-parser-root-n
    (if (unwind-protect (setq value-12 (apply fn-10 args-11)) (setq form
    (let (form-description-14) (if (unwind-protect (setq value-12 (apply
    (let ((value-12 'ert-form-evaluation-aborted-13)) (let (form-descrip
    (let* ((fn-10 #'equal) (args-11 (condition-case err (let ((signal-ho
    (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #'eq) (ar
    (progn (let ((parser (treesit-parser-create 'json))) (let* ((fn-5 #'
    (unwind-protect (progn (let ((parser (treesit-parser-create 'json)))
    (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
    (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current
    (closure (t) nil (let* ((fn-0 #'treesit-language-available-p) (args-
    ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
    ert-run-test(#s(ert-test :name treesit-basic-parsing :documentation
    ert-run-or-rerun-test(#s(ert--stats :selector treesit-basic-parsing
    ert-run-tests(treesit-basic-parsing #f(compiled-function (event-type
    ert-run-tests-batch(treesit-basic-parsing)
    ert-run-tests-batch-and-exit(treesit-basic-parsing)
    eval((ert-run-tests-batch-and-exit 'treesit-basic-parsing) t)
    command-line-1(("-L" ";." "-l" "ert" "-l" "src/treesit-tests.el" "--
    command-line()
    normal-top-level()
  Test treesit-basic-parsing condition:
      (ert-test-failed
       ((should
         (equal
          (treesit-node-string ...)
          "(ERROR)"))
        :form
        (equal "(document)" "(ERROR)")
        :value nil :explanation
        (arrays-of-different-length 10 7 "(document)" "(ERROR)" 
first-mismatch-at 1)))
     FAILED  1/1  treesit-basic-parsing (0.000000 sec) at 
src/treesit-tests.el:59

  Ran 1 tests, 0 results as expected, 1 unexpected (2023-05-13 09:36:52+0300, 
1.078125 sec)

It looks to me that the test assumes an empty buffer should parse as
an error, but the latest JSON grammar succeeds to parse it as a valid
document.

The rest of treesit-tests pass as expected.

Can this be fixed, please?


In GNU Emacs 29.0.90 (build 93, i686-pc-mingw32) of 2023-05-13 built on
 HOME-C4E4A596F7
Repository revision: 4bda96273490e025d1fd1a50b4bf3cab1b2def1c
Repository branch: emacs-29
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)

Configured using:
 'configure -C --prefix=/d/usr --with-wide-int
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3''

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32
ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 42737 8492)
 (symbols 48 6286 0)
 (strings 16 16561 1835)
 (string-bytes 1 399112)
 (vectors 16 9323)
 (vector-slots 8 147333 11986)
 (floats 8 23 33)
 (intervals 40 273 71)
 (buffers 888 10))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]