aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/eunit/doc/overview.edoc2
-rw-r--r--lib/eunit/include/eunit.hrl8
-rw-r--r--lib/odbc/src/odbc.erl2
3 files changed, 11 insertions, 1 deletions
diff --git a/lib/eunit/doc/overview.edoc b/lib/eunit/doc/overview.edoc
index 12ea02f442..ca7ffb83a4 100644
--- a/lib/eunit/doc/overview.edoc
+++ b/lib/eunit/doc/overview.edoc
@@ -693,6 +693,8 @@ it like `debugMsg'. The result is always `ok'.</dd>
shown truncated.) The result is always the value of `Expr', so this
macro can be wrapped around any expression to display its value when
the code is compiled with debugging enabled.</dd>
+<dt>`debugValAll(Expr)'</dt>
+<dd>This is almost same as `debugVal(Expr)`, but doesn't truncate terms to print.</dd>
<dt>`debugTime(Text,Expr)'</dt>
<dd>Prints `Text' and the wall clock time for evaluation of `Expr'. The
result is always the value of `Expr', so this macro can be wrapped
diff --git a/lib/eunit/include/eunit.hrl b/lib/eunit/include/eunit.hrl
index 8f678b0290..b6dbe2d706 100644
--- a/lib/eunit/include/eunit.hrl
+++ b/lib/eunit/include/eunit.hrl
@@ -212,6 +212,7 @@
-define(debugHere, ok).
-define(debugFmt(S, As), ok).
-define(debugVal(E), (E)).
+-define(debugValAll(E), (E)).
-define(debugTime(S, E), (E)).
-else.
-define(debugMsg(S),
@@ -229,6 +230,13 @@
__V
end)(E))
end).
+-define(debugValAll(E),
+ begin
+ ((fun (__V) ->
+ ?debugFmt(<<"~ts = ~tp">>, [(??E), __V]),
+ __V
+ end)(E))
+ end).
-define(debugTime(S, E),
begin
((fun () ->
diff --git a/lib/odbc/src/odbc.erl b/lib/odbc/src/odbc.erl
index 6b0ff27907..8871acd3f4 100644
--- a/lib/odbc/src/odbc.erl
+++ b/lib/odbc/src/odbc.erl
@@ -833,7 +833,7 @@ connect(ConnectionReferense, ConnectionStr, Options) ->
odbc_send(Socket, Msg) -> %% Note currently all allowed messages are lists
NewMsg = Msg ++ [?STR_TERMINATOR],
ok = gen_tcp:send(Socket, NewMsg),
- inet:setopts(Socket, [{active, once}]).
+ ok = inet:setopts(Socket, [{active, once}]).
%%--------------------------------------------------------------------------
connection_config(Key, Options) ->