#!/bin/sh . test/lib.sh begin "Expects a name" scdoc </dev/null (8) EOF end 1 begin "Expects a section" scdoc </dev/null test EOF end 1 begin "Expects a section within the parentheses" scdoc </dev/null test() EOF end 1 begin "Expects name to alphanumeric" scdoc </dev/null !!!!(8) EOF end 1 begin "Expects section to start with a number" scdoc </dev/null test(hello) EOF end 1 begin "Expects section to be legit" scdoc </dev/null test(100) EOF end 1 begin "Expects section to be legit with subsection" scdoc </dev/null test(100hello) EOF end 1 begin "Expects section not to contain a space" scdoc </dev/null test(8 hello) EOF end 1 begin "Accepts a valid preamble" scdoc </dev/null test(8) EOF end 0 begin "Accepts a valid preamble with subsection" scdoc </dev/null test(8hello) EOF end 0 # Make sure SOURCE_DATE_EPOCH is not set for the next tests unset SOURCE_DATE_EPOCH begin "Writes the appropriate header" scdoc </dev/null test(8) EOF end 0 begin "Preserves dashes" scdoc </dev/null test-manual(8) EOF end 0 begin "Handles extra footer field" scdoc </dev/null test-manual(8) "Footer" EOF end 0 begin "Handles both extra fields" scdoc </dev/null test-manual(8) "Footer" "Header" EOF end 0 begin "Emits empty footer correctly" scdoc </dev/null test-manual(8) "" "Header" EOF end 0 export SOURCE_DATE_EPOCH=1512861537 begin "Supports \$SOURCE_DATE_EPOCH" scdoc </dev/null reproducible-manual(8) EOF end 0