GNU bug report logs -
#79027
xref/pp changes in latest versions?
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
I guess it was the default behaviour of the package to take them into
account but it should not be a problem at all to ignore them for testing.
I just tried removing text properties and text file comparison now works.
Thanks a lot for your quick help!
El mié, 16 jul 2025 a las 15:29, Eli Zaretskii (<eliz <at> gnu.org>) escribió:
> > From: Gonzalo Larumbe <gonzalomlarumbe <at> gmail.com>
> > Date: Wed, 16 Jul 2025 14:54:29 +0200
> > Cc: 79027 <at> debbugs.gnu.org
> >
> > The test compares a reference text file generated beforehand using
> `xref` and `pp` (e.g.
> >
> https://github.com/gmlarumbe/verilog-ext/blob/main/test/ref/xref/ucontroller.xref.defs.el)
> with a text file
> > generated during the test.
> >
> > Reference files and current test files are generated using the function
> `test-hdl-process-file-fn`:
> > - Line 84 @
> >
> https://github.com/gmlarumbe/test-hdl/blob/86ed7f9dcb0d0697e6b7ce0a64d82b7245cfade9/test-hdl-common.el
> >
> >
> > This particular xref test compares a list of xref objects gathered from
> a Verilog file using the following test
> > function:
> > (cl-defun verilog-ext-test-xref-fn (&key refs type)
> > (let (ret-val)
> > (dolist (ref refs (nreverse ret-val))
> > (push (verilog-ext-xref--find-symbol ref type) ret-val))))
> >
> > The function `verilog-ext-xref--find-symbol` returns a list of
> `xref-items` with their respective
> > `xref-file-locations` from a hash-table created previously by parsing
> the file using tree-sitter.
> > - Line 40 @
> https://github.com/gmlarumbe/verilog-ext/blob/main/verilog-ext-xref.el
> >
> > This list is pretty printed to a file using `pp-29` as
> `pp-default-function` for compatibility in tests between
> > Emacs 29 and 30.
> >
> > Use of font-lock to have a list of fontified xref matches is
> customizable. In this case the files are parsed and
> > `font-lock-ensure` is run. This did not seem to be a problem and the
> behaviour is the same for versions from
> > 29.1 to 30.1.
> >
> > I tried to override the existing definitions on `pp.el` and `xref.el` so
> that all Emacs versions in CI used the
> > same code. However the `snapshot` build still fails.
>
> Why can't you ignore the differences in the 'fontified' property? It
> should be completely uninteresting for your test to pay attention to
> that property. E.g., run the text through remove-text-properties to
> remove the 'fontified' property, and then compare.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.