mix rfc7208.testsuite (Spfcheck v0.10.0) View Source
This mix task reads
./priv/rfc7208-tests.yaml
(the rfc7208 testsuite) and creates:
./test/rfc7208-<xx>-<desc>.exs
, along with./test/zones/rfc7208-<xx>-<desc>.zonedata
for each section (see below) in the testsuite.
Tests
Tests check the verdict and explanation string for each testcase in the
testsuite. They also include a _cli = """spfcheck ..."""
which can be
copied to the command line to see the same testcase with debug output in the
terminal.
Each test is also tagged with:
set: "section_number"
, andtst: "section_number.test_number"
so mix test --only ..
can focus on a complete section or just one specific
test.
Usage:
mix rfc7208.testsuite
mix test
mix test --only set:x, where x is in 0..15
mix test --only tst:x.y, where y refers to a specific test in section x
More information at www.open-spf.org:
RFC7208 testsuite sections
- 0 - Initial processing
- 1 - Record lookup
- 2 - Selecting records
- 3 - Record evaluation
- 4 -
ALL
mechanism syntax - 5 -
PTR
mechanism syntax - 6 -
A
mechanism syntax - 7 -
INCLUDE
mechanism syntax - 8 -
MX
mechanism syntax - 9 -
EXISTS
mechanism syntax - 10 -
IP4
mechanism syntax - 11 -
IP6
mechanism syntax - 12 - Semantics of
EXP
and other modifiers - 13 - Macro expansion rules
- 14 - Processing limits
- 15 - Test cases from implementation bugs