Files
aego/engine/docs/hidechecks_test.go
sanspie 6e8ebcd90f
ci-platforms / build (amd64, darwin, macos-15-intel) (push) Skipped
ci / checks (push) Successful in 5m39s
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 7m49s
ci / release (push) Successful in 7m23s
ci-platforms / build (amd64, windows, windows-2022) (push) Skipped
ci-platforms / build (arm64, darwin, macos-15) (push) Skipped
docs: the scenes docs check plays after each step stay out of the pages
2026-10-25 18:13:09 +03:00

17 lines
576 B
Go

package docs
import "testing"
// Readers see the steps and the scripts; the scenes docs check plays stay out of the page.
func TestHideChecks(t *testing.T) {
md := "Add a floor.\n\n```aescene check\nscene version=1 {}\n```\n\nThen a script:\n\n```aes check\npackage game\n```\n"
got := HideChecks(md)
want := "Add a floor.\n\nThen a script:\n\n```aes check\npackage game\n```"
if got != want {
t.Fatalf("HideChecks =\n%q\nwant\n%q", got, want)
}
if s := snippets(md); len(s) != 2 || !s[0].Check {
t.Fatalf("the check scene must stay in the snippets: %+v", s)
}
}