1
0
forked from rosa/hakurei

check: move from container

This package is not container specific, and widely used across the project.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 15:35:58 +09:00
parent e9a72490db
commit 6d015a949e
103 changed files with 103 additions and 103 deletions

31
check/overlay_test.go Normal file
View File

@@ -0,0 +1,31 @@
package check_test
import (
"testing"
"hakurei.app/check"
)
func TestEscapeOverlayDataSegment(t *testing.T) {
t.Parallel()
testCases := []struct {
name string
s string
want string
}{
{"zero", "", ""},
{"multi", `\\\:,:,\\\`, `\\\\\\\:\,\:\,\\\\\\`},
{"bwrap", `/path :,\`, `/path \:\,\\`},
}
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
if got := check.EscapeOverlayDataSegment(tc.s); got != tc.want {
t.Errorf("escapeOverlayDataSegment: %s, want %s", got, tc.want)
}
})
}
}