diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 29d8b74..53f1ef1 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-10-01T00:42:54","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-01T00:43:51","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/guide/index.html b/dev/guide/index.html index 91a64f6..887012b 100644 --- a/dev/guide/index.html +++ b/dev/guide/index.html @@ -45,4 +45,4 @@ Tests passed: 3 TESTING SUCCESSFUL! julia> success -true +true diff --git a/dev/index.html b/dev/index.html index b42aa8a..e5445fb 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · NarrativeTest.jl

NarrativeTest.jl Documentation

NarrativeTest is a Julia library for functional testing, which lets you write the test suite in the narrative form. It permits you to describe the behavior of software components in the Markdown format, and then extract, execute, and validate any embedded test code.

NarrativeTest can be compared to the Doctest module (see also Documenter.jl). It differs from Doctest in its approach to syntax: instead of presenting the test suite as a part of an interactive session, NarrativeTest uses plain code blocks with expected output in comments. It also focuses less on docstrings and documentation examples, and more on validating the ergonomics of API with "literate testing".

Contents

Index

+Home · NarrativeTest.jl

NarrativeTest.jl Documentation

NarrativeTest is a Julia library for functional testing, which lets you write the test suite in the narrative form. It permits you to describe the behavior of software components in the Markdown format, and then extract, execute, and validate any embedded test code.

NarrativeTest can be compared to the Doctest module (see also Documenter.jl). It differs from Doctest in its approach to syntax: instead of presenting the test suite as a part of an interactive session, NarrativeTest uses plain code blocks with expected output in comments. It also focuses less on docstrings and documentation examples, and more on validating the ergonomics of API with "literate testing".

Contents

Index

diff --git a/dev/reference/index.html b/dev/reference/index.html index 6443652..63b43b0 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -10,4 +10,4 @@ end

The given Markdown files are analyized to extract and run the embedded test cases. When a directory is passed, all nested *.md files are loaded. When invoked without arguments, all *.md files in the program directory are loaded, which can be overridden using the default parameter.

Specify subs to customize substitutions applied to the expected output in order to convert it to a regular expression.

Specify mod to execute tests in the context of the given module.

Set quiet = true to suppress all output except for error reports.

source
NarrativeTest.runtestFunction
runtest(test::TestCase; subs = common_subs(), mod = nothing) :: AbstractResult
 runtest(loc, code; pre = nothing, expect = nothing, subs = common_subs(), mod = nothing) :: AbstractResult

Run the given test case, return the result.

source
NarrativeTest.parsemdFunction
parsemd(file) :: Vector{AbstractTestCase}
 parsemd(name, io) :: Vector{AbstractTestCase}

Parse the specified Markdown file to extract the embedded test suite; return a list of test cases.

source
NarrativeTest.parsejlFunction
parsejl(file) :: Vector{AbstractTestCase}
-parsejl(name, io) :: Vector{AbstractTestCase}

Load the specified Julia source file and extract the embedded test suite; return a list of test cases.

source
NarrativeTest.common_argsFunction
common_args() :: Vector{String}

Default test files for use when the test runner has no arguments.

source
NarrativeTest.common_subsFunction
common_subs() :: Vector{Pair{Regex,SubstitutionString{String}}}

Substitutions applied to the expected output in order to convert it to a regular expression.

source
+parsejl(name, io) :: Vector{AbstractTestCase}

Load the specified Julia source file and extract the embedded test suite; return a list of test cases.

source
NarrativeTest.common_argsFunction
common_args() :: Vector{String}

Default test files for use when the test runner has no arguments.

source
NarrativeTest.common_subsFunction
common_subs() :: Vector{Pair{Regex,SubstitutionString{String}}}

Substitutions applied to the expected output in order to convert it to a regular expression.

source
diff --git a/dev/test/index.html b/dev/test/index.html index da2a826..8f6666e 100644 --- a/dev/test/index.html +++ b/dev/test/index.html @@ -520,4 +520,4 @@ =#

A test case can be executed in the context of a specific module.

runtest(@__FILE__, "hello = \"Hello World!\"", mod=Main)
 
 Main.hello
-#-> "Hello World!"
+#-> "Hello World!"