Skip to content

Instantly share code, notes, and snippets.

@sideshowcoder
Created February 23, 2014 12:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sideshowcoder/9170939 to your computer and use it in GitHub Desktop.
Save sideshowcoder/9170939 to your computer and use it in GitHub Desktop.
Run Erlang EUnit from the shell
# replace ERLANG_MODULE with the module you try to test, i.e. calc
erlc -DTEST ERLANG_MODULE.erl && erl -noshell -pa . -eval "eunit:test(ERLANG_MODULE, [verbose])" -s init stop
" replace ERLANG_MODULE with the module you try to test, i.e. calc
" Define ,t in vim to run the tests
:map ,t :!erlc -DTEST ERLANG_MODULE.erl && erl -noshell -pa . -eval "eunit:test(ERLANG_MODULE, [verbose])" -s init stop<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment