From cecc394bd8a1d6f17064031d51f1bccd172e2631 Mon Sep 17 00:00:00 2001 From: Max Brauer Date: Sat, 17 Sep 2022 17:17:34 +0200 Subject: [PATCH] Add example to FileTests doc --- test/filetests/filetests.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/filetests/filetests.go b/test/filetests/filetests.go index b31965ec..e1b9ad29 100644 --- a/test/filetests/filetests.go +++ b/test/filetests/filetests.go @@ -40,6 +40,17 @@ type EvaluateTemplate func(src string) (MarshalableResult, *TestErr) // - expected output starting with `ERR:` indicate that expected output is an error message // - expected output starting with `OUTPUT POSITION:` indicate that expected output is "pos" format // - otherwise expected output is the literal output from template +// +// For example: +// +// #! my-test.tpltest +// --- +// #@ msg = "hello" +// msg: #@ msg +// +++ +// +// msg: hello +// type FileTests struct { PathToTests string EvalFunc EvaluateTemplate