Permalink
Browse files

first unit test

  • Loading branch information...
1 parent 63bd4b3 commit 0ff19a37f2caa1557a54117692209310cbb3dbdc @athoune athoune committed Aug 10, 2010
Showing with 12 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +11 −0 src/syslog.erl
View
1 .gitignore
@@ -1,3 +1,4 @@
c_src/syslog_drv.o
ebin/
priv/
+.eunit/
View
11 src/syslog.erl
@@ -22,6 +22,10 @@
code_change/3
]).
+-ifdef(TEST).
+-include_lib("eunit/include/eunit.hrl").
+-endif.
+
-record(state, {port}).
start() ->
@@ -163,3 +167,10 @@ load_path(File) ->
{error, enoent}
end.
+-ifdef(TEST).
+
+logopt_test() ->
+ {ok, _} = syslog:start(),
+ 11 = logopt([1,2,8]).
+
+-endif.

0 comments on commit 0ff19a3

Please sign in to comment.