AtlatestRepositorysigil-doc

sigil-doc / tree / test / fixturesexample-check.sgd

1#lang sigil/doc/book
2@chapter["Hidden Checks" authors: '("David Wilson")]{
3@example["inline-check" expect-value: "#t" timeout: 30 check: '(equal? greeting "hello")]{
4@code["sigil"]{(define greeting "hello")}
5}
6@example["file-check" source-file: "example-check/settings.sgl" check-file: "example-check/settings.check.sgl" expect-value: "(\"dark\" 14)" timeout: 30 display: 'source]{}
7@example["result-check" expect-value: "3" timeout: 30 check: '(length example-result)]{
8@code["sigil"]{(list 'alpha 'beta 'gamma)}
9}
10@example["session-base" session: "doubling" expect-value: "#t" timeout: 30 check: '(= base 10)]{
11@code["sigil"]{(define base 10)}
13@example["session-doubled" session: "doubling" expect-value: "20" timeout: 30 check: 'doubled]{
14@code["sigil"]{(define doubled (* base 2))}
16@example["plain" expect-value: "3" timeout: 30]{
17@code["sigil"]{(+ 1 2)}