aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/file_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/file_test.go')
-rw-r--r--internal/pkg/file_test.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/internal/pkg/file_test.go b/internal/pkg/file_test.go
new file mode 100644
index 00000000..48e55624
--- /dev/null
+++ b/internal/pkg/file_test.go
@@ -0,0 +1,29 @@
+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([]byte{0}), base.Append(
+ "identifier",
+ "lIx_W4M7tVOcQ8jh08EJOfXf4brRmkEEjvUa7c17vVUzlmtUxlhhrgqmc9aZhjbn",
+ ), pkg.MustDecode(
+ "vsAhtPNo4waRNOASwrQwcIPTqb3SBuJOXw2G4T1mNmVZM-wrQTRllmgXqcIIoRcX",
+ ), nil},
+ })
+ }, pkg.MustDecode(
+ "hnrfmJtivNKcgtETsKnU9gP_OwPgpNY3DSUJnmxnmeOODSO-YBvEBiTgieY4AAd7",
+ )},
+ })
+}