[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55420] [PATCH v2 1/2] guix: emacs-utils: Add emacs-batch-script.
From: |
Fredrik Salomonsson |
Subject: |
[bug#55420] [PATCH v2 1/2] guix: emacs-utils: Add emacs-batch-script. |
Date: |
Sun, 05 Jun 2022 20:02:42 +0000 |
Hi Maxime,
Maxime Devos <maximedevos@telenet.be> writes:
> Fredrik Salomonsson schreef op zo 05-06-2022 om 00:19 [+0000]:
>> +(test-equal "print foo from emacs"
>> + "foo"
>> + (emacs-batch-script '(princ "foo")))
>
> IIUC, this can only be run if emacs is in $PATH when running the tests,
> so sometimes the test needs to be skipped. As an example on how to do
> this, see the "pypi->guix-package, wheels" test in tests/pypi.scm.
Yes, you are correct. All my tests started to fail when I added `--pure`
to my test command.
I just sent in a v3 of the patches when I skip the tests if emacs is not
in the PATH.
I also changed the tests for the `emacs-header-parse` to be wrapped by
`call-with-temporary-directory`. It felt wasteful to create and destroy that
file for each test when the file is static.
I opted to just have one test-skip and skip all five of them. Although
that migth be too fragile. Would be great to have something like:
(unless (which "emacs")
(test-skip "emacs-batch-script:")
(test-skip "emacs-header-parse:"))
But the docs just mention a counter or the full name of a test.
--
s/Fred[re]+i[ck]+/Fredrik/g