Added test with sample file
This commit is contained in:
parent
7853500bca
commit
997900eac1
|
@ -15,9 +15,9 @@ test-internal: margin-notes.lua test/test-functions.lua
|
|||
@echo -e '==========================\nAll internal tests passed.\n==========================\n'
|
||||
rm --interactive=never test/tmp.lua
|
||||
|
||||
test: margin-notes.lua test/test.md
|
||||
pandoc -t native -L margin-notes.lua test/test.md > test/tmp.native
|
||||
diff test/tmp.native test/test.native
|
||||
test: margin-notes.lua sample.md
|
||||
pandoc -t native -L margin-notes.lua sample.md > test/tmp.native
|
||||
diff test/tmp.native test/sample.native
|
||||
@echo -e '\n===============\ntest passed.\n===============\n'
|
||||
rm test/tmp.native
|
||||
|
||||
|
|
120
margin-notes/test/sample.native
Normal file
120
margin-notes/test/sample.native
Normal file
|
@ -0,0 +1,120 @@
|
|||
[ Para
|
||||
[ Span ( "" , [ "warning" ] , [] ) []
|
||||
, Strong [ Str "Important!" ]
|
||||
, Str "You"
|
||||
, Space
|
||||
, Str "can"
|
||||
, Space
|
||||
, Str "use"
|
||||
, Space
|
||||
, Str "LaTeX"
|
||||
, Space
|
||||
, Str "to"
|
||||
, Space
|
||||
, Str "include"
|
||||
, SoftBreak
|
||||
, Span
|
||||
( ""
|
||||
, [ "term" ]
|
||||
, [ ( "lem" , "BibTeX" )
|
||||
, ( "def"
|
||||
, "A program designed to format bibliographical entries"
|
||||
)
|
||||
]
|
||||
)
|
||||
[ Strong [ Str "BibTeX" ] ]
|
||||
, Str "BibTeX:"
|
||||
, Space
|
||||
, Emph
|
||||
[ Str "A"
|
||||
, Space
|
||||
, Str "program"
|
||||
, Space
|
||||
, Str "designed"
|
||||
, Space
|
||||
, Str "to"
|
||||
, Space
|
||||
, Str "format"
|
||||
, Space
|
||||
, Str "bibliographical"
|
||||
, Space
|
||||
, Str "entries"
|
||||
]
|
||||
, Space
|
||||
, Str "citations."
|
||||
, Space
|
||||
, Str "Note"
|
||||
, Space
|
||||
, Str "that"
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "LaTeX"
|
||||
, Space
|
||||
, Str "environments,"
|
||||
, SoftBreak
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "material"
|
||||
, Space
|
||||
, Str "between"
|
||||
, Space
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "begin"
|
||||
, Space
|
||||
, Str "and"
|
||||
, Space
|
||||
, Str "end"
|
||||
, Space
|
||||
, Str "tags"
|
||||
, Space
|
||||
, Str "will"
|
||||
, Space
|
||||
, Str "be"
|
||||
, Space
|
||||
, Str "interpreted"
|
||||
, SoftBreak
|
||||
, Str "as"
|
||||
, Space
|
||||
, Span
|
||||
( ""
|
||||
, [ "term" ]
|
||||
, [ ( "lem" , "Raw code" )
|
||||
, ( "def" , "Code inserted **untouched** in the output." )
|
||||
]
|
||||
)
|
||||
[ Strong [ Str "raw" , Space , Str "LaTeX" ] ]
|
||||
, Str "Raw"
|
||||
, Space
|
||||
, Str "code:"
|
||||
, Space
|
||||
, Emph
|
||||
[ Str "Code"
|
||||
, Space
|
||||
, Str "inserted"
|
||||
, Space
|
||||
, Strong [ Str "untouched" ]
|
||||
, Space
|
||||
, Str "in"
|
||||
, Space
|
||||
, Str "the"
|
||||
, Space
|
||||
, Str "output."
|
||||
]
|
||||
, Str ","
|
||||
, Space
|
||||
, Str "not"
|
||||
, Space
|
||||
, Str "as"
|
||||
, Space
|
||||
, Str "Markdown."
|
||||
]
|
||||
, Para
|
||||
[ Str "(From"
|
||||
, Space
|
||||
, Str "Pandoc"
|
||||
, Space
|
||||
, Str "manual)"
|
||||
]
|
||||
]
|
Loading…
Reference in New Issue
Block a user