mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-01-16 21:32:15 +00:00
25 lines
418 B
Go
25 lines
418 B
Go
package izapple2
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestSwyftTutorial(t *testing.T) {
|
|
at, err := makeApple2Tester("swyft", nil)
|
|
if err != nil {
|
|
t.Fatal(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)
|
|
}
|
|
|
|
}
|