summaryrefslogtreecommitdiff
path: root/t/metadata/licenses.t
diff options
context:
space:
mode:
authorRuss Allbery <rra@cpan.org>2021-02-27 11:46:10 -0800
committerRuss Allbery <rra@cpan.org>2021-02-27 11:46:10 -0800
commite4eed38a794c09b546e29bcce3516df941fdbfa8 (patch)
treebb9a8676bfb122aa983776b3ebb2430213e997a5 /t/metadata/licenses.t
parentb1677085bf2b2bf4f05bb85fdb75b449c2f85a0a (diff)
Isolate tests from global configuration
Set the relevant XDG environment variables at the top of each test so that the tests will not accidentally pick up any local user configuration.
Diffstat (limited to 't/metadata/licenses.t')
-rwxr-xr-xt/metadata/licenses.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/metadata/licenses.t b/t/metadata/licenses.t
index 4006ffd..422dbd3 100755
--- a/t/metadata/licenses.t
+++ b/t/metadata/licenses.t
@@ -2,7 +2,7 @@
#
# Tests for license metadata.
#
-# Copyright 2017-2018, 2020 Russ Allbery <rra@cpan.org>
+# Copyright 2017-2018, 2020-2021 Russ Allbery <rra@cpan.org>
#
# SPDX-License-Identifier: MIT
@@ -15,6 +15,10 @@ use Kwalify qw(validate);
use Test::More tests => 2;
use YAML::XS ();
+# Isolate from the environment.
+local $ENV{XDG_CONFIG_HOME} = '/nonexistent';
+local $ENV{XDG_CONFIG_DIRS} = '/nonexistent';
+
# Load the module.
BEGIN { use_ok('App::DocKnot') }