# from [f6a806eecb0d936a3831a6645457cbeed9758307] # to [2230d26ba35875be86cbb8000b4c0c8c7d36f735] --- +++ @@ -0,0 +1,25 @@ +mtn_setup() + +check(mtn("manpage"), 0, true, false) +rename("stdout", "manpage") + +-- check for a proper header line +check(mtn("version"), 0, true, false) +local s,e,version = string.find(readfile("stdout"), "(monotone %d+\.%d+%S*)") +check(qgrep(".TH \"monotone\" 1 \"" .. os.date("%Y-%m-%d") .. "\" \"" .. version .. "\"", "manpage")) + +-- check required sections +check(qgrep(".SH \"NAME\"", "manpage")) +check(qgrep(".SH \"SYNOPSIS\"", "manpage")) + +-- check the optional sections +check(qgrep(".SH \"DESCRIPTION\"", "manpage")) +check(qgrep(".SH \"GLOBAL OPTIONS\"", "manpage")) +check(qgrep(".SH \"COMMANDS\"", "manpage")) +check(qgrep(".SH \"SEE ALSO\"", "manpage")) +check(qgrep(".SH \"BUGS\"", "manpage")) +check(qgrep(".SH \"AUTHORS\"", "manpage")) +check(qgrep(".SH \"COPYRIGHT\"", "manpage")) + +-- ensure that the copyright is up-to-date +check(qgrep("Copyright [(]c[)] 2004 - "..os.date("%Y"), "manpage"))