You've already forked collage-maker
add collage package
This commit is contained in:
24
collage/collage_test.go
Normal file
24
collage/collage_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package collage
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
//go:embed test_data/*
|
||||
var testData embed.FS
|
||||
|
||||
func TestMake(t *testing.T) {
|
||||
t.Log("Test was run")
|
||||
ifs, err := fs.Sub(testData, "test_data")
|
||||
if err != nil {
|
||||
t.Fatalf("getting test_data subdir failed %v", err)
|
||||
}
|
||||
img1f, err := ifs.Open("img1.jpg")
|
||||
if err != nil {
|
||||
t.Fatalf("opening image failed %v", err)
|
||||
}
|
||||
fmt.Printf("%#v\n", img1f)
|
||||
}
|
||||
Reference in New Issue
Block a user