aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/internal/mountinfo/mountinfo_guard.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-03 17:49:27 +0900
committerOphestra <cat@gensokyo.uk>2026-10-03 18:15:20 +0900
commitaa41002e8078a3ab00896cbd403e573c6dd817c2 (patch)
tree9ebcf82d99ff95a97a8661ffdaf86dd20c9213bf /test/internal/mountinfo/mountinfo_guard.go
parent4697e493fe59a2e61b5e8e8a9d0ae4b8e338e378 (diff)
test/internal/mountinfo: move from sandbox
This also improves its API. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/internal/mountinfo/mountinfo_guard.go')
-rw-r--r--test/internal/mountinfo/mountinfo_guard.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/internal/mountinfo/mountinfo_guard.go b/test/internal/mountinfo/mountinfo_guard.go
new file mode 100644
index 00000000..aaf63ac4
--- /dev/null
+++ b/test/internal/mountinfo/mountinfo_guard.go
@@ -0,0 +1,15 @@
+//go:build !testsuite && !tester
+
+package mountinfo
+
+import (
+ "os"
+ "testing"
+)
+
+func init() {
+ if !testing.Testing() {
+ println("package mountinfo imported in non-testsuite program")
+ os.Exit(1)
+ }
+}