diff options
author | Magnus Henoch <[email protected]> | 2012-08-17 18:56:01 +0100 |
---|---|---|
committer | Magnus Henoch <[email protected]> | 2012-08-22 18:07:57 +0100 |
commit | 5c248b8bb63ee2f32e189a6a4f0202539fd991ed (patch) | |
tree | 5984c017510ab6f861ba8693bff0f2d891b9b94a | |
parent | 24ad2d1d985bbadb28dc8fe9dfee5e33c3bdcbbc (diff) | |
download | otp-5c248b8bb63ee2f32e189a6a4f0202539fd991ed.tar.gz otp-5c248b8bb63ee2f32e189a6a4f0202539fd991ed.tar.bz2 otp-5c248b8bb63ee2f32e189a6a4f0202539fd991ed.zip |
Add test_indentation target to lib/tools/emacs/Makefile
Automatically indent test.erl.orig, save to test.erl, and compare to
test.erl.intended.
-rw-r--r-- | lib/tools/emacs/Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tools/emacs/Makefile b/lib/tools/emacs/Makefile index e5ed56b412..69946be24a 100644 --- a/lib/tools/emacs/Makefile +++ b/lib/tools/emacs/Makefile @@ -86,3 +86,19 @@ release_docs_spec: docs $(INSTALL_DATA) $(MAN_FILES) "$(RELEASE_PATH)/man/man3" endif endif + +EMACS ?= emacs + +test_indentation: + @rm -f test.erl + @rm -f test_indent.el + @echo '(load "erlang-start")' >> test_indent.el + @echo '(find-file "test.erl.orig")' >> test_indent.el + @echo "(require 'cl) ; required with Emacs < 23 for ignore-errors" >> test_indent.el + @echo '(erlang-mode)' >> test_indent.el + @echo '(toggle-debug-on-error)' >> test_indent.el + @echo '(erlang-indent-current-buffer)' >> test_indent.el + @echo '(write-file "test.erl")' >> test_indent.el + $(EMACS) --batch -Q -L . -l test_indent.el + diff -u test.erl.indented test.erl + @echo "No differences between expected and actual indentation" |