Skip to content

Commit 1a1ce67

Browse files
Seemingly working makecart script
1 parent 7e4c1a6 commit 1a1ce67

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

arduboy/flashcart_script_test.go

+10-9
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ func TestRunLuaFlashcartGenerator_MakeCart(t *testing.T) {
411411
if err != nil {
412412
t.Fatalf("Couldn't read lua script: %s", err)
413413
}
414-
//combinedbin := loadFullCart("fxsave_combined.bin", t)
414+
415+
comparebin := loadFullCart("makecart.bin", t)
415416

416417
outbinpath, err := newRandomFilepath("makecart.bin")
417418
if err != nil {
@@ -422,14 +423,14 @@ func TestRunLuaFlashcartGenerator_MakeCart(t *testing.T) {
422423
if err != nil {
423424
t.Fatalf("Couldn't run flashcart generator: %s. Log: \n%s", err, errout)
424425
}
425-
//// Compare the two files
426-
//testbin, err := os.ReadFile(outbinpath)
427-
//if err != nil {
428-
// t.Fatalf("Couldn't read %s: %s", outbinpath, err)
429-
//}
430-
//if !bytes.Equal(combinedbin, testbin) {
431-
// t.Fatalf("Written flashcart not equivalent! %d bytes vs %d", len(testbin), len(combinedbin))
432-
//}
426+
// Compare the two files
427+
testbin, err := os.ReadFile(outbinpath)
428+
if err != nil {
429+
t.Fatalf("Couldn't read %s: %s", outbinpath, err)
430+
}
431+
if !bytes.Equal(comparebin, testbin) {
432+
t.Fatalf("Written flashcart not equivalent! %d bytes vs %d", len(testbin), len(comparebin))
433+
}
433434
}
434435

435436
func TestFindSuitablePackageImage(t *testing.T) {

testfiles/fullcarts.zip

161 KB
Binary file not shown.

0 commit comments

Comments
 (0)