Warning, /education/cantor/thirdparty/discount-2.2.6-patched/tests/dl.t is written in an unsupported language. File is not indexed.
0001 . tests/functions.sh 0002 0003 title "definition lists" 0004 0005 rc=0 0006 MARKDOWN_FLAGS= 0007 0008 SRC=' 0009 =this= 0010 is an ugly 0011 =test= 0012 eh?' 0013 0014 RSLT='<dl> 0015 <dt>this</dt> 0016 <dd>is an ugly</dd> 0017 <dt>test</dt> 0018 <dd>eh?</dd> 0019 </dl>' 0020 0021 # discount style 0022 try -fdefinitionlist '=tag= generates definition lists' "$SRC" "$RSLT" 0023 0024 try 'one item with two =tags=' \ 0025 '=this= 0026 =is= 0027 A test, eh?' \ 0028 '<dl> 0029 <dt>this</dt> 0030 <dt>is</dt> 0031 <dd>A test, eh?</dd> 0032 </dl>' 0033 0034 # extra style 0035 try -fnodefinitionlist,dlextra '=tag= does nothing' "$SRC" \ 0036 '<p>=this= 0037 is an ugly 0038 =test= 0039 eh?</p>' 0040 0041 try -fdlextra 'markdown extra-style definition lists' \ 0042 'foo 0043 : bar' \ 0044 '<dl> 0045 <dt>foo</dt> 0046 <dd>bar</dd> 0047 </dl>' 0048 0049 try -fdlextra '... with two <dt>s in a row' \ 0050 'foo 0051 bar 0052 : baz' \ 0053 '<dl> 0054 <dt>foo</dt> 0055 <dt>bar</dt> 0056 <dd>baz</dd> 0057 </dl>' 0058 0059 try -fdlextra '... with two <dd>s in a row' \ 0060 'foo 0061 : bar 0062 : baz' \ 0063 '<dl> 0064 <dt>foo</dt> 0065 <dd>bar</dd> 0066 <dd>baz</dd> 0067 </dl>' 0068 0069 try -fdlextra '... with blanks between list items' \ 0070 'foo 0071 : bar 0072 0073 zip 0074 : zap' \ 0075 '<dl> 0076 <dt>foo</dt> 0077 <dd>bar</dd> 0078 <dt>zip</dt> 0079 <dd>zap</dd> 0080 </dl>' 0081 0082 # Hmm, redundancy... 0083 SRC='foo 0084 : bar 0085 0086 =this= 0087 is ugly' 0088 RSLT='<p>foo 0089 : bar</p> 0090 0091 <p>=this= 0092 is ugly</p>' 0093 try -fnodldiscount '... with definitionlists enabled but all styles disabled' \ 0094 "$SRC" \ 0095 "$RSLT" 0096 try -fnodefinitionlist,dldiscount,dlextra '... with definitionlists disabled but all styles enabled' \ 0097 "$SRC" \ 0098 "$RSLT" 0099 0100 summary $0 0101 exit $rc