mirror of
https://codeberg.org/scip/epuppy.git
synced 2025-12-17 20:41:00 +01:00
initial commit
This commit is contained in:
28
pkg/epub/epub_test.go
Normal file
28
pkg/epub/epub_test.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package epub_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/kapmahc/epub"
|
||||
)
|
||||
|
||||
func TestEpub(t *testing.T) {
|
||||
bk, err := open(t, "test.epub")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer bk.Close()
|
||||
}
|
||||
|
||||
func open(t *testing.T, f string) (*epub.Book, error) {
|
||||
bk, err := epub.Open(f)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer bk.Close()
|
||||
|
||||
t.Logf("files: %+v", bk.Files())
|
||||
t.Logf("book: %+v", bk)
|
||||
|
||||
return bk, nil
|
||||
}
|
||||
Reference in New Issue
Block a user