aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/env_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-07 20:06:26 +0900
committerOphestra <cat@gensokyo.uk>2025-10-07 20:57:58 +0900
commit0e6c1a50260de141c50bb50fd3f2b2bcf9a3fe64 (patch)
treedfe9c40ceb8c1be8d2728a2db9017bffef174d3d /internal/app/env_test.go
parentd23b4dc9e64d3f00e746c65f3038a1a6de44b8f5 (diff)
container/check: move absolute pathname
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/env_test.go')
-rw-r--r--internal/app/env_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/app/env_test.go b/internal/app/env_test.go
index 04e21344..cf6a18b3 100644
--- a/internal/app/env_test.go
+++ b/internal/app/env_test.go
@@ -6,6 +6,7 @@ import (
"testing"
"hakurei.app/container"
+ "hakurei.app/container/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
)
@@ -74,11 +75,11 @@ func TestCopyPaths(t *testing.T) {
{"invalid tempdir", nil, "\x00",
"invalid TMPDIR: path \"\\x00\" is not absolute", EnvPaths{}},
{"empty environment", make(map[string]string), container.Nonexistent,
- "", EnvPaths{TempDir: container.MustAbs(container.Nonexistent)}},
+ "", EnvPaths{TempDir: check.MustAbs(container.Nonexistent)}},
{"invalid XDG_RUNTIME_DIR", map[string]string{"XDG_RUNTIME_DIR": "\x00"}, container.Nonexistent,
- "", EnvPaths{TempDir: container.MustAbs(container.Nonexistent)}},
+ "", EnvPaths{TempDir: check.MustAbs(container.Nonexistent)}},
{"full", map[string]string{"XDG_RUNTIME_DIR": "/\x00"}, container.Nonexistent,
- "", EnvPaths{TempDir: container.MustAbs(container.Nonexistent), RuntimePath: container.MustAbs("/\x00")}},
+ "", EnvPaths{TempDir: check.MustAbs(container.Nonexistent), RuntimePath: check.MustAbs("/\x00")}},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {