bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54435: The test mailcap-parsing-and-mailcap-mime-info forgets to res


From: Felix Dietrich
Subject: bug#54435: The test mailcap-parsing-and-mailcap-mime-info forgets to restore the HOME environment variable
Date: Thu, 17 Mar 2022 15:16:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Severity: minor
Tags: patch

Running the test ‘mailcap-parsing-and-mailcap-mime-info’ will set the
HOME environment variable to a temporary directory.  After the test the
directory is removed (thanks to the ‘ert-with-temp-directory’ macro),
but the value of the environment variable not restored, polluting the
state of a running Emacs and affecting later commands in the Emacs
session, like the vc-* commands when git cannot find its global
configuration anymore.

The patch wraps the test in a ‘let’ and ‘unwind-protect’ to restore the
value of the environment variable after the test has been run.

Attachment: 0001-mailcap-tests-Restore-HOME-environment-variable.patch
Description: Patch to ensure restoration of HOME environment variable


-- 
Felix Dietrich

reply via email to

[Prev in Thread] Current Thread [Next in Thread]