mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-10-31 20:09:02 +00:00
27 lines
507 B
Go
27 lines
507 B
Go
|
package izapple2
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestSwyftTutorial(t *testing.T) {
|
||
|
at := makeApple2Tester("2e")
|
||
|
at.a.AddSwyftCard()
|
||
|
err := at.a.AddDisk2(6, "<internal>/SwyftWare_-_SwyftCard_Tutorial.woz", "", nil)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
at.terminateCondition = func(a *Apple2) bool {
|
||
|
return a.cpu.GetCycles() > 10_000_000
|
||
|
}
|
||
|
at.run()
|
||
|
|
||
|
text := at.getText80()
|
||
|
if !strings.Contains(text, "HOW TO USE SWYFTCARD") {
|
||
|
t.Errorf("Expected 'HOW TO USE SWYFTCARD', got '%s'", text)
|
||
|
}
|
||
|
|
||
|
}
|