Files
holos/doc/md/tutorial/hello-holos_test.go
Gary Larizza 982db2cccc docs: Update Hello Holos tutorial to use testscript
PROBLEM:

The "Hello Holos" tutorial has hardcoded code blocks and hasn't been
updated to use the automated testscript workflow.

SOLUTION:

* Create a test for the Hello Holos tutorial.
* Create a testscript for the Hello Holos test.
* Update the Hello Holos MDX file to load in data from the testscript directory.

OUTCOME:

The code content in the Hello Holos tutorial now comes directly from the
testscript workflow.
2025-01-16 10:12:17 -08:00

20 lines
428 B
Go

package main
import (
"path/filepath"
"testing"
)
// Run these with go test -v to see the verbose names
func TestHelloHolos(t *testing.T) {
t.Run("TestHelloHolos", func(t *testing.T) {
// Get an ordered list of test script files.
dir := "_hello-holos"
for _, file := range sortedTestScripts(t, filepath.Join(dir, "examples")) {
t.Run("examples", func(t *testing.T) {
runOneScript(t, dir, file)
})
}
})
}