Hi! 3 days ago Eli Zaretskii wrote: >> From: Stefan Merten >> May be I do not understand Lars' intentions here, but what is testing >> the C code good for at all? I mean there is an API - or rather: lots >> of APIs - and *this* is what needs testing. The C code to me looks >> like an implementation detail I'd not write tests for. Or at least >> separate those tests clearly from the API tests. > > You seem to think that every C code in Emacs is part or a subroutine > of some Lisp API. But that is false: Of course. Sorry for my ignorance. My focus is on the interface exposed in Lisp but that is of course only part of the story if you really want a good test coverage. > e.g., the display engine is > implemented almost entirely in C. If you have no test harness for > testing that, you cannot be sure, for example, that some change didn't > break cursor positioning Sure. > Other important parts of Emacs that are implemented almost entirely in > C include: > > . GC > > . keyboard input > > . interaction with subprocesses > > . file I/O > > There's probably more; these are just off the top of my head. That would call for different test suites then. Also you hardly can test all this by ert tests but need other frameworks for the tests. Also the tests in an repository need to be organized or otherwise you'll end up in chaos soon. For instance at the moment for rst.el I have 22 lisp files with ert tests making up for nearly 10000 lines of code. Yes, this is about the double of the lines rst.el has... Grüße Stefan