summaryrefslogtreecommitdiff
path: root/pngmeta/metareader_test.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2024-12-02 19:58:03 +0300
committerGrail Finder <wohilas@gmail.com>2024-12-02 19:58:03 +0300
commita5ab816c9434022159548ac0d1872160b3c8908d (patch)
treea4e68c334f2a514f02afd65a1bb70eff415fb8cd /pngmeta/metareader_test.go
parent8d3997baff25f28c23441699be7692f853cf1f0f (diff)
Feat: add character card support
Diffstat (limited to 'pngmeta/metareader_test.go')
-rw-r--r--pngmeta/metareader_test.go33
1 files changed, 33 insertions, 0 deletions
diff --git a/pngmeta/metareader_test.go b/pngmeta/metareader_test.go
new file mode 100644
index 0000000..51dadc6
--- /dev/null
+++ b/pngmeta/metareader_test.go
@@ -0,0 +1,33 @@
+package pngmeta
+
+import (
+ "fmt"
+ "testing"
+)
+
+func TestReadMeta(t *testing.T) {
+ cases := []struct {
+ Filename string
+ }{
+ {
+ Filename: "../sysprompts/default_Seraphina.png",
+ },
+ {
+ Filename: "../sysprompts/llama.png",
+ },
+ }
+ for i, tc := range cases {
+ t.Run(fmt.Sprintf("test_%d", i), func(t *testing.T) {
+ // Call the readMeta function
+ pembed, err := extractChar(tc.Filename)
+ if err != nil {
+ t.Errorf("Expected no error, but got %v", err)
+ }
+ v, err := pembed.GetDecodedValue()
+ if err != nil {
+ t.Errorf("Expected no error, but got %v\n", err)
+ }
+ fmt.Printf("%+v\n", v.Simplify("Adam"))
+ })
+ }
+}