mirror of
https://github.com/valitydev/msgpack-erlang.git
synced 2024-11-06 00:35:24 +00:00
Move to rebar3
This commit is contained in:
parent
2834fb1b4b
commit
ab2da38b57
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,4 +3,5 @@ ebin/*.app
|
|||||||
*.beam
|
*.beam
|
||||||
*~
|
*~
|
||||||
deps
|
deps
|
||||||
*.so
|
*.so
|
||||||
|
_build
|
||||||
|
8
Makefile
8
Makefile
@ -1,6 +1,6 @@
|
|||||||
.PHONY: compile xref eunit clean doc check make deps test
|
.PHONY: compile xref eunit clean doc check make deps test
|
||||||
|
|
||||||
REBAR=./rebar
|
REBAR=./rebar3
|
||||||
|
|
||||||
all: compile
|
all: compile
|
||||||
|
|
||||||
@ -18,11 +18,11 @@ deps:
|
|||||||
compile:
|
compile:
|
||||||
@$(REBAR) compile
|
@$(REBAR) compile
|
||||||
|
|
||||||
xref: compile
|
xref:
|
||||||
@$(REBAR) xref
|
@$(REBAR) xref
|
||||||
|
|
||||||
test: compile xref
|
test:
|
||||||
@./rebar eunit
|
@$(REBAR) eunit
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@$(REBAR) clean
|
@$(REBAR) clean
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
case erlang:system_info(otp_release) of
|
|
||||||
|
|
||||||
%% Rxx, before R16
|
|
||||||
[$R|_] ->
|
|
||||||
HashDefine = [{d,without_map}],
|
|
||||||
case lists:keysearch(erl_opts, 1, CONFIG) of
|
|
||||||
{value, {erl_opts, Opts}} ->
|
|
||||||
lists:keyreplace(erl_opts,1,CONFIG,{erl_opts,Opts++HashDefine});
|
|
||||||
false ->
|
|
||||||
CONFIG ++ [{erl_opts, HashDefine}]
|
|
||||||
end;
|
|
||||||
|
|
||||||
%% In 17, maps are experimental
|
|
||||||
"17" ->
|
|
||||||
CONFIG;
|
|
||||||
|
|
||||||
_ ->
|
|
||||||
HashDefine = [{d,default_map}],
|
|
||||||
case lists:keysearch(erl_opts, 1, CONFIG) of
|
|
||||||
{value, {erl_opts, Opts}} ->
|
|
||||||
lists:keyreplace(erl_opts,1,CONFIG,{erl_opts,Opts++HashDefine});
|
|
||||||
false ->
|
|
||||||
CONFIG ++ [{erl_opts, HashDefine}]
|
|
||||||
end
|
|
||||||
end.
|
|
1
rebar.lock
Normal file
1
rebar.lock
Normal file
@ -0,0 +1 @@
|
|||||||
|
[].
|
@ -16,7 +16,7 @@
|
|||||||
%% limitations under the License.
|
%% limitations under the License.
|
||||||
%%
|
%%
|
||||||
|
|
||||||
-module(msgpack_ext_example_tests).
|
-module(msgpack_ext_tests).
|
||||||
|
|
||||||
-compile(export_all).
|
-compile(export_all).
|
||||||
|
|
@ -17,7 +17,7 @@
|
|||||||
%%
|
%%
|
||||||
%% Created : 26 Apr 2011 by UENISHI Kota <uenishi.kota@lab.ntt.co.jp>
|
%% Created : 26 Apr 2011 by UENISHI Kota <uenishi.kota@lab.ntt.co.jp>
|
||||||
|
|
||||||
-module(msgpack_test).
|
-module(msgpack_tests).
|
||||||
|
|
||||||
-import(msgpack, [pack/2, unpack/2, pack/1, unpack/1]).
|
-import(msgpack, [pack/2, unpack/2, pack/1, unpack/1]).
|
||||||
|
|
||||||
@ -172,7 +172,8 @@ issue_27_test_() ->
|
|||||||
|
|
||||||
string_test() ->
|
string_test() ->
|
||||||
{ok, CWD} = file:get_cwd(),
|
{ok, CWD} = file:get_cwd(),
|
||||||
Path = CWD ++ "/../test/utf8.txt",
|
Path = CWD ++ "/test/utf8.txt",
|
||||||
|
%% ?debugVal(Path),
|
||||||
{ok, UnicodeBin} = file:read_file(Path),
|
{ok, UnicodeBin} = file:read_file(Path),
|
||||||
String = unicode:characters_to_list(UnicodeBin),
|
String = unicode:characters_to_list(UnicodeBin),
|
||||||
MsgpackStringBin = msgpack:pack(String),
|
MsgpackStringBin = msgpack:pack(String),
|
Loading…
Reference in New Issue
Block a user