diskm8/disk/atokens_test.go

45 lines
603 B
Go
Raw Permalink Normal View History

2018-04-23 12:35:34 +00:00
package disk
import (
"strings"
"testing"
)
func TestHGR2Tokenise(t *testing.T) {
lines := []string{
"10 HGR2 : REM SOMETHING",
"20 REM SOMETHING ELSE",
}
a := ApplesoftTokenize(lines)
s := string(ApplesoftDetoks(a))
t.Logf("code: %s", s)
if !strings.Contains(s, "HGR2 ") {
t.Fatalf("Expected HGR2")
}
}
func TestHGRTokenise(t *testing.T) {
lines := []string{
"10 HGR : REM SOMETHING",
"20 REM SOMETHING ELSE",
}
a := ApplesoftTokenize(lines)
s := string(ApplesoftDetoks(a))
t.Logf("code: %s", s)
if !strings.Contains(s, "HGR ") {
t.Fatalf("Expected HGR")
}
}