Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:20
ux
ux-3.4.1-git.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ux-3.4.1-git.patch of Package ux
diff --git a/.gitignore b/.gitignore index fbfcc5b..f218ed6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ _test *.dump deps/* +ebin/ .eunit log logs diff --git a/ebin/ux.app b/ebin/ux.app deleted file mode 100644 index c6d28d8..0000000 --- a/ebin/ux.app +++ /dev/null @@ -1,23 +0,0 @@ -{application,ux, - [{description,"ux"}, - {vsn,"3.0.1"}, - {modules,[ux,ux_app,ux_char,ux_deps,ux_gb,ux_opt_ranges, - ux_ranges,ux_string,ux_sup,ux_types,ux_uca,ux_uca_alt, - ux_uca_compress,ux_uca_decomp,ux_uca_extract, - ux_uca_options,ux_uca_sort_key_binary, - ux_uca_sort_key_binary_cs,ux_uca_sort_key_list, - ux_uca_sort_key_uncompressed,ux_uca_testdata, - ux_uca_utils,ux_unidata,ux_unidata_filelist, - ux_unidata_parser,ux_unidata_parser_allkeys, - ux_unidata_parser_blocks, - ux_unidata_parser_comp_exclusions, - ux_unidata_parser_grapheme_break_property, - ux_unidata_parser_norm_props, - ux_unidata_parser_scripts,ux_unidata_parser_unidata, - ux_unidata_parser_word_break_property, - ux_unidata_server,ux_unidata_store, - ux_unidata_store_sup,ux_wb]}, - {registered,[]}, - {mod,{ux_app,[]}}, - {env,[]}, - {applications,[kernel,stdlib]}]}. diff --git a/rebar.config b/rebar.config index f74d144..ac94995 100644 --- a/rebar.config +++ b/rebar.config @@ -11,8 +11,6 @@ %% Comment to run doc generation for github: % {edown, ".*", {git, "git://github.com/esl/edown.git", "master"}}, - {abnfc, ".*", - {git, "git://github.com/nygge/abnfc.git", "master"}}, {metamodule, ".*", {git, "git://github.com/arcusfelis/metamodule.git", "master"}} ]}. diff --git a/src/unidata/ux_unidata_parser.erl b/src/unidata/ux_unidata_parser.erl index 0752698..ef8a15c 100644 --- a/src/unidata/ux_unidata_parser.erl +++ b/src/unidata/ux_unidata_parser.erl @@ -148,7 +148,7 @@ create_tables(DataTypes) -> do_create_tables(DataTypes, []). do_create_tables([Name|T], Acc) -> - E = ets:new(Name, []), + E = ets:new(Name, [{write_concurrency, false}, {read_concurrency, true}]), ?DBG( "~w: Create ETS table ~w. ~n", [?MODULE, E]), diff --git a/src/unidata/ux_unidata_parser_allkeys.erl b/src/unidata/ux_unidata_parser_allkeys.erl index c214a06..d9e61ec 100644 --- a/src/unidata/ux_unidata_parser_allkeys.erl +++ b/src/unidata/ux_unidata_parser_allkeys.erl @@ -95,10 +95,10 @@ get_val(Table, Val) -> do_after([{ducet, Table} | Tail]) -> do_after_ranges(Table), - LTable = ets:new(ducet_lookup, []), + LTable = ets:new(ducet_lookup, [{write_concurrency, false}, {read_concurrency, true}]), do_after_lookup(Table, LTable), - MTable = ets:new(ducet_more, []), + MTable = ets:new(ducet_more, [{write_concurrency, false}, {read_concurrency, true}]), do_after_ducet(Table, MTable), ets:insert(Table, {'LTable', LTable}), diff --git a/src/ux.app.src b/src/ux.app.src index 6033de2..0a0ddf1 100644 --- a/src/ux.app.src +++ b/src/ux.app.src @@ -11,4 +11,4 @@ {registered, []}, {mod, {'ux_app', []}}, {env, []}, - {applications, [kernel, stdlib]}]}. + {applications, [kernel, stdlib, metamodule]}]}. diff --git a/src/ux.erl b/src/ux.erl index 3770aa2..4590e8b 100644 --- a/src/ux.erl +++ b/src/ux.erl @@ -8,9 +8,14 @@ -author("Uvarov Michael <arcusfelis@gmail.com>"). -export([start/0, stop/0]). +-define(APP, ux). + %% @spec start() -> ok %% @doc Start the ux server. start() -> + application:load(?APP), + {ok, Deps} = application:get_key(?APP, applications), + true = lists:all(fun ensure_started/1, Deps), ux_deps:ensure(), application:start(ux). @@ -19,3 +24,16 @@ start() -> %% @doc Stop the ux server. stop() -> application:stop(ux). + + +ensure_started(App) -> + case application:start(App) of + ok -> + true; + {error, {already_started, App}} -> + true; + Else -> + error_logger:error_msg("Couldn't start ~p: ~p", [App, Else]), + Else + end. + diff --git a/src/ux_deps.erl b/src/ux_deps.erl index a7cdc47..bc6489e 100644 --- a/src/ux_deps.erl +++ b/src/ux_deps.erl @@ -51,7 +51,7 @@ new_siblings(Module) -> %% of the application for Module are on the code path. ensure(Module) -> code:add_paths(new_siblings(Module)), - code:clash(), +% code:clash(), ok. %% @spec ensure() -> ok diff --git a/test/ux_char_tests.erl b/test/ux_char_tests.erl index 021ac53..a79a278 100644 --- a/test/ux_char_tests.erl +++ b/test/ux_char_tests.erl @@ -7,6 +7,7 @@ is_letter_test_() -> + setup(), M = 'ux_char', F = 'is_letter', [?_assertTO(not M:F($ )) @@ -18,6 +19,7 @@ is_letter_test_() -> ]. is_ascii_test_() -> + setup(), M = 'ux_char', F = 'is_acsii', [?_assertTO(M:F($ )) @@ -29,6 +31,7 @@ is_ascii_test_() -> ]. is_lower_test_() -> + setup(), M = 'ux_char', F = 'is_lower', [?_assertTO(not M:F($ )) @@ -41,6 +44,7 @@ is_lower_test_() -> is_upper_test_() -> + setup(), M = 'ux_char', F = 'is_upper', [?_assertTO(not M:F($ )) @@ -52,6 +56,7 @@ is_upper_test_() -> ]. is_punctuation_mark_test_() -> + setup(), M = 'ux_char', F = 'is_punctuation_mark', [?_assertTO(not M:F($ )) @@ -63,6 +68,7 @@ is_punctuation_mark_test_() -> ]. is_decimal_test_() -> + setup(), M = 'ux_char', F = 'is_decimal', [?_assertTO(not M:F($ )) @@ -74,6 +80,7 @@ is_decimal_test_() -> ]. is_number_test_() -> + setup(), M = 'ux_char', F = 'is_number', [?_assertTO(not M:F($ )) @@ -85,6 +92,7 @@ is_number_test_() -> ]. is_separator_test_() -> + setup(), M = 'ux_char', F = 'is_separator', [?_assertTO(M:F($ )) diff --git a/test/ux_string_tests.erl b/test/ux_string_tests.erl index b2848fc..bbc8320 100644 --- a/test/ux_string_tests.erl +++ b/test/ux_string_tests.erl @@ -11,6 +11,7 @@ explode_test_() -> + setup(), M = 'ux_string', F = 'explode', [?_assertEqual(M:F(":", "1:2:3"), ["1", "2", "3"]) @@ -83,6 +84,7 @@ explode_test_() -> %% to_lower_test_() -> + setup(), M = 'ux_string', F = 'to_lower', [?_assertEqualTO(M:F("small BIG"), "small big") @@ -108,6 +110,7 @@ to_upper_test_() -> ]. delete_types_test_() -> + setup(), M = 'ux_string', F = 'delete_types', [?_assertEqualTO(M:F(['Ll', 'Lu'], "Tom Cat!"), " !") @@ -126,6 +129,7 @@ delete_types_test_() -> ]. filter_types_test_() -> + setup(), M = 'ux_string', F = 'filter_types', [?_assertEqualTO(M:F(['Ll', 'Lu'], "Tom Cat!"), "TomCat") @@ -142,6 +146,7 @@ filter_types_test_() -> ]. types_test_() -> + setup(), M = 'ux_string', F = 'types', [?_assertEqualTO(M:F("Tom Cat!"), ['Lu','Ll','Ll','Zs','Lu','Ll','Ll','Po']) @@ -150,6 +155,7 @@ types_test_() -> ]. last_types_test_() -> + setup(), M = 'ux_string', F = 'last_types', [?_assertEqualTO(M:F(['Ll'], "AavbfFDsdfffd9s9999", -5), "99999") @@ -160,6 +166,7 @@ last_types_test_() -> ]. first_types_test_() -> + setup(), M = 'ux_string', F = 'first_types', [?_assertEqualTO(M:F(['Ll'], "AavbfFDsdfffds", 4), "avbf") @@ -171,6 +178,7 @@ first_types_test_() -> to_graphemes_test_() -> + setup(), M = 'ux_string', F = 'to_graphemes', [{"Simple example", @@ -181,6 +189,7 @@ to_graphemes_test_() -> ]. first_test_() -> + setup(), M = 'ux_string', F = 'first', [?_assertEqualTO(M:F("Octocat!", 4), "Octo") @@ -189,6 +198,7 @@ first_test_() -> ]. last_test_() -> + setup(), M = 'ux_string', F = 'last', [?_assertEqualTO(M:F("Octocat!", 4), "cat!") @@ -197,6 +207,7 @@ last_test_() -> ]. length_test_() -> + setup(), M = 'ux_string', F = 'length', [?_assertEqualTO(M:F("Octo"), 4) @@ -205,6 +216,7 @@ length_test_() -> script_test_() -> + setup(), M = 'ux_string', F = 'script', [?_assertEqualTO(M:F("Octocat!"), 'Latin') @@ -215,6 +227,7 @@ script_test_() -> scripts_test_() -> + setup(), M = 'ux_string', F = 'scripts', S = fun lists:sort/1, @@ -226,24 +239,28 @@ scripts_test_() -> to_nfc_test_() -> + setup(), M = 'ux_string', F = 'to_nfc', [?_assertEqualTO(M:F(""), "") ]. to_nfd_test_() -> + setup(), M = 'ux_string', F = 'to_nfd', [?_assertEqualTO(M:F(""), "") ]. to_nfkc_test_() -> + setup(), M = 'ux_string', F = 'to_nfkc', [?_assertEqualTO(M:F(""), "") ]. to_nfkd_test_() -> + setup(), M = 'ux_string', F = 'to_nfkd', [?_assertEqualTO(M:F(""), "") @@ -254,18 +271,21 @@ to_nfkd_test_() -> is_nfc_test_() -> + setup(), M = 'ux_string', F = 'is_nfc', [?_assertEqualTO(M:F(""), 'yes') ]. is_nfd_test_() -> + setup(), M = 'ux_string', F = 'is_nfd', [?_assertEqualTO(M:F(""), 'yes') ]. is_nfkc_test_() -> + setup(), M = 'ux_string', F = 'is_nfkc', [?_assertEqualTO(M:F(""), 'yes') @@ -295,6 +315,7 @@ is_nfkd_test_() -> -ifdef(SLOW_TESTS). nfc_test_() -> + setup(), {timeout, 300, {"Normalization Conformance Test", fun() -> diff --git a/test/ux_tests.hrl b/test/ux_tests.hrl index 931cad5..c38c140 100644 --- a/test/ux_tests.hrl +++ b/test/ux_tests.hrl @@ -7,3 +7,5 @@ ?TO(?_assert(X))). -define(_assertEqualTO(X, Y), ?TO(?_assertEqual(X,Y))). + +setup() -> ux:start(). diff --git a/test/ux_uca_tests.erl b/test/ux_uca_tests.erl index f5ab768..825d08d 100644 --- a/test/ux_uca_tests.erl +++ b/test/ux_uca_tests.erl @@ -220,6 +220,7 @@ % base1 selected_test_() -> + setup(), Params1 = ux_uca_options:get_options(non_ignorable), Params2 = ux_uca_options:get_options(shifted), [{"Hangul tests", @@ -253,11 +254,13 @@ selected_test_() -> simple_sort_test_() -> + setup(), F = fun ux_uca:sort/1, {"Simple input data.", ?_assertEqualTO(F(["A", "C", "B"]), ["A", "B", "C"])}. natural_sort_test_() -> + setup(), Unsorted = ["1000X Radonius Maximus", "10X Radonius", "200X Radonius", @@ -368,6 +371,7 @@ natural_sort_test_() -> %--------------------------------------------------------------- -ifdef(SLOW_TESTS). non_ignorable_test_() -> + setup(), {timeout, 1200, fun() -> prof(ux_unidata:open_test_file('collation_test_non_ignorable'), @@ -376,6 +380,7 @@ non_ignorable_test_() -> end}. shifted_test_() -> + setup(), {timeout, 1200, fun() -> prof(ux_unidata:open_test_file('collation_test_shifted'), @@ -399,6 +404,7 @@ shifted_test_() -> natural_sort_long_test_() -> + setup(), {timeout, 600, fun() -> nat_prof(lists:seq(1, 10000, 1)),
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor