Include margin-notes.lua
This commit is contained in:
23
margin-notes/Makefile
Normal file
23
margin-notes/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
.PHONY: test test-internal test-fr test-en
|
||||
|
||||
SHELL=/bin/bash
|
||||
nblines := $(shell wc -l margin-notes.lua | cut -d ' ' -f 1)
|
||||
but_four_last_lines := $(shell echo $$(($(nblines) - 4)))
|
||||
|
||||
test: test test-internal
|
||||
|
||||
test-internal: margin-notes.lua test/test-functions.lua
|
||||
-rm --interactive=never test/tmp.lua
|
||||
sed -n 1,$(but_four_last_lines)p margin-notes.lua > test/tmp.lua
|
||||
cat test/test-functions.lua >> test/tmp.lua
|
||||
chmod -w test/tmp.lua
|
||||
pandoc -L test/tmp.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
|
||||
@echo -e '\n===============\ntest passed.\n===============\n'
|
||||
rm test/tmp.native
|
||||
|
Reference in New Issue
Block a user