unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17797: 24.3; Include ert-buffer.el in Emacs
@ 2014-06-17 13:32 Thorsten Jolitz
  2014-06-19 20:46 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Jolitz @ 2014-06-17 13:32 UTC (permalink / raw)
  To: 17797


The library 'ert-buffer.el', which does not seem to have a repository
nor to be included in any package repo, but can easily be found via a
web-search, offers some fundamental extensions to ERT functionality in
Emacs core and should thus be included in core.

In summary, it allows to create ert-Buf objects either from string or
from an existing buffer and run tests comparing:

 - point
 - mark
 - content
 - return-value

Since the buffer is such a core concept of Emacs, comparing buffers
seems like a core task in testing. Library ert-buffer.el implements all
the necessary functionality, so that creating this kind of tests is
really fast, even when (sometimes big and complex) real-world
files/buffers are used for testing.

The functionality of ert-buffer.el might potentially be re-implemented
many times when ERT tests that compare buffers are written. Its choice
of criteria for comparing buffers seems pragmatic, keepings things
simple, and thus making it easy to write buffer-tests.

-- 
cheers,
Thorsten






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17797: 24.3; Include ert-buffer.el in Emacs
  2014-06-17 13:32 bug#17797: 24.3; Include ert-buffer.el in Emacs Thorsten Jolitz
@ 2014-06-19 20:46 ` Stefan Monnier
  2020-10-23  3:00   ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2014-06-19 20:46 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: 17797

> The library 'ert-buffer.el', which does not seem to have a repository
> nor to be included in any package repo, but can easily be found via a
> web-search, offers some fundamental extensions to ERT functionality in
> Emacs core and should thus be included in core.

I don't have a strong opinion either way because I don't know this area
well enough to judge how useful this can be.  So whoever thinks this is
a good or a bad idea, please chime in,


        Stefan





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17797: 24.3; Include ert-buffer.el in Emacs
  2014-06-19 20:46 ` Stefan Monnier
@ 2020-10-23  3:00   ` Stefan Kangas
  2020-12-06  9:19     ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2020-10-23  3:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17797, Thorsten Jolitz

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> The library 'ert-buffer.el', which does not seem to have a repository
>> nor to be included in any package repo, but can easily be found via a
>> web-search, offers some fundamental extensions to ERT functionality in
>> Emacs core and should thus be included in core.
>
> I don't have a strong opinion either way because I don't know this area
> well enough to judge how useful this can be.  So whoever thinks this is
> a good or a bad idea, please chime in,

This seems to be:

https://docutils.sourceforge.io/tools/editors/emacs/tests/ert-buffer.el

I'm not sure that this is useful for general use.  It has some
interesting ideas, but I'm not a big fan of the forms you seem to end up
with:

;;   (should (ert-equal-buffer '(insert "foo")
;;                             ; Insertion of "foo"...
;;   			       (concat ert-Buf-point-char ert-Buf-mark-char)
;;                             ; ...into an empty buffer with point and mark...
;;   			       (concat ert-Buf-mark-char "foo"
;;   				       ert-Buf-point-char)))
;;                             ; ...should result in a buffer containing "foo"
;;                             ; with point and mark moved appropriately.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#17797: 24.3; Include ert-buffer.el in Emacs
  2020-10-23  3:00   ` Stefan Kangas
@ 2020-12-06  9:19     ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-12-06  9:19 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17797, Thorsten Jolitz

tags 17797 wontfix
close 17797
thanks

Stefan Kangas <stefan@marxist.se> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> The library 'ert-buffer.el', which does not seem to have a repository
>>> nor to be included in any package repo, but can easily be found via a
>>> web-search, offers some fundamental extensions to ERT functionality in
>>> Emacs core and should thus be included in core.
>>
>> I don't have a strong opinion either way because I don't know this area
>> well enough to judge how useful this can be.  So whoever thinks this is
>> a good or a bad idea, please chime in,
>
> This seems to be:
>
> https://docutils.sourceforge.io/tools/editors/emacs/tests/ert-buffer.el
>
> I'm not sure that this is useful for general use.  It has some
> interesting ideas, but I'm not a big fan of the forms you seem to end up
> with:
>
> ;;   (should (ert-equal-buffer '(insert "foo")
> ;;                             ; Insertion of "foo"...
> ;;   			       (concat ert-Buf-point-char ert-Buf-mark-char)
> ;;                             ; ...into an empty buffer with point and mark...
> ;;   			       (concat ert-Buf-mark-char "foo"
> ;;   				       ert-Buf-point-char)))
> ;;                             ; ...should result in a buffer containing "foo"
> ;;                             ; with point and mark moved appropriately.

No further comments within 6 weeks, so I'm closing this as wontfix.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-06  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-17 13:32 bug#17797: 24.3; Include ert-buffer.el in Emacs Thorsten Jolitz
2014-06-19 20:46 ` Stefan Monnier
2020-10-23  3:00   ` Stefan Kangas
2020-12-06  9:19     ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).