Skip to content

Commit 477ede1

Browse files
committed
Erlang EUnit snippets
1 parent 255d18c commit 477ede1

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

snippets/erlang.snippets

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,37 @@ snippet gen_event
482482
%%%===================================================================
483483
%%% Internal functions
484484
%%%===================================================================
485+
# EUnit snippets
486+
snippet eunit
487+
-module(${1:`vim_snippets#Filename('', 'my')`}).
488+
-include_lib("eunit/include/eunit.hrl").
489+
490+
${0}
491+
snippet ieunit
492+
-ifdef(TEST).
493+
-include_lib("eunit/include/eunit.hrl").
494+
495+
${0}
496+
497+
-endif.
498+
snippet as
499+
?assert(${0})
500+
snippet asn
501+
?assertNot(${0})
502+
snippet aseq
503+
?assertEqual(${1}, ${0})
504+
snippet asneq
505+
?assertNotEqual(${1}, ${0})
506+
snippet asmat
507+
?assertMatch(${1:Pattern}, ${0:Expression})
508+
snippet asnmat
509+
?assertNotMatch(${1:Pattern}, ${0:Expression})
510+
snippet aserr
511+
?assertError(${1:Pattern}, ${0:Expression})
512+
snippet asex
513+
?assertExit(${1:Pattern}, ${0:Expression})
514+
snippet asexc
515+
?assertException(${1:Class}, ${2:Pattern}, ${0:Expression})
485516
# common_test test_SUITE
486517
snippet testsuite
487518
-module(${0:`vim_snippets#Filename('', 'my')`}).

0 commit comments

Comments
 (0)