1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# Test file format 2 - one or more test groups, which are input followed by one or more tests/
#
# See --help-format/shelltest.hs. Last copied 2015/3/16:
# "--------------------------------------"
# ,"shelltestrunner test file format:"
# ,""
# ,"# COMMENTS OR BLANK LINES"
# ,"<<<"
# ,"INPUT"
# ,"$$$ COMMAND LINE"
# ,">>>"
# ,"EXPECTED OUTPUT (OR >>> /REGEX/)"
# ,">>>2"
# ,"EXPECTED STDERR (OR >>>2 /REGEX/)"
# ,">>>= EXPECTED EXIT STATUS (OR >>>= /REGEX/)"
# ,"# COMMENTS OR BLANK LINES"
# ,"ADDITIONAL TESTS FOR THIS INPUT"
# ,"ADDITIONAL TEST GROUPS WITH DIFFERENT INPUT"
# ,""
# ,"All parts are optional except the command line."
# ,"When unspecified, stdout/stderr/exit status are tested for emptiness."
# ,""
# ,"The <<< delimiter is optional for the first input in a file."
# ,"Without it, input begins at the first non-blank/comment line."
# ,"Input ends at the $$$ delimiter. You can't put a comment before the first $$$."
# ,""
# ,"The >>> delimiter is optional except when matching via regex."
# ,"Expected output/stderr extends to the next >>>2 or >>>= if present,"
# ,"or to the last non-blank/comment line before the next <<< or $$$ or file end."
# ,""
# ,"Two spaces between $$$ and the command protects it from -w/--with."
# ,"!/REGEX/ negates a regular expression match."
# ,""
# ,"--------------------------------------"
AA
$$$ cat
AA
# test 2
$$$ cat
>>> /A/
>>>2
>>>= 0
# test 3
<<<
A
$$$ cat
>>> /A/
>>>2
>>>=
#
|