Starting on writing the library

Currently just parses the superblock (but that works!)
This commit is contained in:
Caleb Gardner
2020-11-10 05:54:49 -06:00
parent 40541575f8
commit 630e6e0f7c
10 changed files with 2232 additions and 2094 deletions
+23 -2
View File
@@ -1,4 +1,4 @@
package squashfs_test
package squashfs
import (
"io"
@@ -15,8 +15,29 @@ const (
squashfsName = "Code_OSS.Squashfs"
)
func TestCreateSquashFromAppImage(t *testing.T) {
func TestAppImageSquash(t *testing.T) {
t.Parallel()
wd, err := os.Getwd()
if err != nil {
t.Error(err)
}
squashFil, err := os.Open(wd + "/testing/" + squashfsName)
if os.IsNotExist(err) {
TestCreateSquashFromAppImage(t)
squashFil, err = os.Open(wd + "/testing/" + squashfsName)
if err != nil {
t.Error(err)
}
}
defer squashFil.Close()
squash, err := NewSquashfs(squashFil)
if err != nil {
t.Error(err)
}
t.Fatal("Testing")
}
func TestCreateSquashFromAppImage(t *testing.T) {
wd, err := os.Getwd()
if err != nil {
t.Fatal(err)