Files
hakurei/internal/pkg/file_test.go
Ophestra 610572d0e6
All checks were successful
Test / Create distribution (push) Successful in 47s
Test / Sandbox (race detector) (push) Successful in 8m9s
Test / ShareFS (push) Successful in 8m30s
Test / Hakurei (race detector) (push) Successful in 10m35s
Test / Hakurei (push) Successful in 3m58s
Test / Sandbox (push) Successful in 1m42s
Test / Hpkg (push) Successful in 3m57s
Test / Flake checks (push) Successful in 1m46s
internal/pkg: optionally named static file
These are generally for generating configuration files or build scripts, naming them is quite useful.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-12 04:34:50 +09:00

30 lines
677 B
Go

package pkg_test
import (
"testing"
"hakurei.app/container/check"
"hakurei.app/internal/pkg"
)
func TestFile(t *testing.T) {
t.Parallel()
checkWithCache(t, []cacheTestCase{
{"file", nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) {
c.SetStrict(true)
cureMany(t, c, []cureStep{
{"short", pkg.NewFile("null", []byte{0}), base.Append(
"identifier",
"lIx_W4M7tVOcQ8jh08EJOfXf4brRmkEEjvUa7c17vVUzlmtUxlhhrgqmc9aZhjbn",
), pkg.MustDecode(
"vsAhtPNo4waRNOASwrQwcIPTqb3SBuJOXw2G4T1mNmVZM-wrQTRllmgXqcIIoRcX",
), nil},
})
}, pkg.MustDecode(
"hnrfmJtivNKcgtETsKnU9gP_OwPgpNY3DSUJnmxnmeOODSO-YBvEBiTgieY4AAd7",
)},
})
}