Files
sanspie 2744cff481
ci-platforms / build (amd64, darwin, macos-15-intel) (push) Skipped
ci-platforms / build (amd64, windows, windows-2022) (push) Skipped
ci-platforms / build (arm64, darwin, macos-15) (push) Skipped
ci / checks (push) Successful in 21m57s
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 23m31s
Stage 9.6c1: project refs and refactorings without the editor (D298)
2026-10-20 12:12:18 +03:00

28 lines
697 B
Go

//go:build aego_editor
package mutate_test
import (
"bytes"
"testing"
"aego/core/ids"
"aego/editor/core/document"
"aego/editor/core/scenediff"
"aego/format/aetext"
"aego/project/refactor"
"aego/project/refs"
)
func TestRefTokenMatchesSceneText(t *testing.T) {
for _, id := range []ids.AssetID{{}, {Hi: 0x7a1e0c5b3d9f4a2e, Lo: 0x8c6b1d0f9e8a7c02}} {
want := []byte(scenediff.ValueText(aetext.AssetRef(id.String())))
if got := refs.Token(id); !bytes.Equal(got, want) {
t.Fatalf("token %q, scene text %q", got, want)
}
}
if refactor.ScriptExt != document.ScriptExt {
t.Fatalf("script extension %q in refactor, %q in the editor", refactor.ScriptExt, document.ScriptExt)
}
}