Files
sex/tools/sextest
alex-eg d83ee32f12
Some checks failed
Sex CI / build-macos (pull_request) Has been cancelled
Sex CI / build-linux (pull_request) Failing after 3m34s
add source line number preservation
For source-level debug. Add --line-directives option, defaulted to
statement. Disabled when used with -C. Explicit non-none value
overrides disabling when -C is present
2026-09-09 14:16:32 +03:00
..
2026-05-21 20:15:03 +03:00
2026-09-09 12:45:12 +03:00
2026-09-09 12:45:12 +03:00
2026-05-21 20:15:03 +03:00
2026-09-09 12:45:12 +03:00

Sextest

A tool for testing Sex compiler by using test programs. The tools compiles test programs, then runs with provided input, checking the output and return code.

Test format

The test program is just a regular Sex program, which may contain additional toplevel forms, to define compilation parameters, input to the program, and expected output and return code. Default value for compilation, input and output is an empty strings. For the return code it is 0.

Example

some-test.sex:

(compilation "-- -O2")
(input "")
(output "Hello world!")
(return 123)

(include stdio.h)

(pub fn main () int
  (puts "Hello World!")
  (return 123))