Current section

Files

Jump to
testament src testament@conf.erl
Raw

src/testament@conf.erl

-module(testament@conf).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-define(FILEPATH, "src/testament/conf.gleam").
-export_type([import/0, conf/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(
" Testament config\n"
"\n"
" # Example\n"
" ```gleam\n"
" import gleeunit\n"
" import testament\n"
" import testament/conf\n"
"\n"
" pub fn main() -> Nil {\n"
" testament.test_main_with_opts(gleeunit.main, [\n"
" // ignore any doc tests in `src/ignored.gleam`\n"
" conf.IgnoreFiles([\"src/ignored.gleam\"]),\n"
" // add import `gleam/string` into tests for `src/string_util.gleam`\n"
" conf.ExtraImports(\"src/string_util.gleam\", [\"gleam/string\"]),\n"
" // generate doc tests for gleam snippets in `docs/docs.md`\n"
" conf.Markdown([\"docs/docs.md\"]),\n"
" ])\n"
" }\n"
" ```\n"
).
-type import() :: {import, binary(), list(binary())}.
-type conf() :: {ignore_files, list(binary())} |
verbose |
preserve_files |
{extra_imports, binary(), list(import())} |
{markdown, list(binary())}.