Closed svaante closed 8 months ago
You know what you be a really good idea this early in the dape-test.el
file? Namespaces. I.e. make the new definitions of dape-test.el
start with the prefix dape-test-
(or dape-test--
). Then it would be much easier to track what bits of dape.el
you are actually probing/exercising.
I didn't do this for eglot-tests.el
and I kind of regret it: it's a bit of a mess that periodically bites me.
Of course, I can hear you say already "but typing dape-tests--
everytime is a pain!! I'll never remember to do it" And if you are saying that I fully agree. So you could use shorthands in this file, they are supported since Emacs 28 and some extensions out there are using it.
So something like this footer in dape-test.el
;; Local Variables:
;; read-symbol-shorthands: (("dt-" . "dape-tests-"))
;; End:
All the symbols are still named dape-tests-<foo>
but you can type them (in this file only, of course) as dt-
(or test-
or daniel-
or t-
or whatever you prefer).
Follow emacs make test target naming
Speaking of convention, another reasonably arbitrary one is that the file containing tests for package foo.el
is named foo-tests.el
plural, not foo-test.el
. So if there's no good reason not to, I'd switch to that too.
Speaking of convention, another reasonably arbitrary one is that the file containing tests for package foo.el is named foo-tests.el plural, not foo-test.el. So if there's no good reason not to, I'd switch to that too.
Duh, nevermind, you already have it like that. 🤦
You know what you be a really good idea this early in the
dape-test.el
file? Namespaces. I.e. make the new definitions ofdape-test.el
start with the prefixdape-test-
(ordape-test--
). Then it would be much easier to track what bits ofdape.el
you are actually probing/exercising.I didn't do this for
eglot-tests.el
and I kind of regret it: it's a bit of a mess that periodically bites me.Of course, I can hear you say already "but typing
dape-tests--
everytime is a pain!! I'll never remember to do it" And if you are saying that I fully agree. So you could use shorthands in this file, they are supported since Emacs 28 and some extensions out there are using it.So something like this footer in
dape-test.el
;; Local Variables: ;; read-symbol-shorthands: (("dt-" . "dape-tests-")) ;; End:
All the symbols are still named
dape-tests-<foo>
but you can type them (in this file only, of course) asdt-
(ortest-
ordaniel-
ort-
or whatever you prefer).
Will do, makes sense. Is this the best diss I have ever received daniel-
? Im hoping you are referring to what I think you are referring to.
is this the best diss I have ever received daniel-
I'm lost :grimacing: You are Daniel right? (Or Svante?) I just meant daniel-
as an example of the shorthand prefix you can use, like I could use joao-
, but the actual symbols would be dape-test-foo
. Sorry, I didn't mean to diss at all
Basis for tests discussion