Skip to content

Commit

Permalink
Merge pull request #61 from walter-weinmann/wwe_version_1.2.2
Browse files Browse the repository at this point in the history
Version 1.2.2
  • Loading branch information
walter-weinmann authored Nov 11, 2016
2 parents def07b4 + 222b458 commit ffcac04
Show file tree
Hide file tree
Showing 25 changed files with 103 additions and 200 deletions.
20 changes: 6 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
*.dot
erl_crash.dump
.rebar/
ebin/
deps/
/ct/*.beam
/ct/generic_*_SUITE.erl
/ct/logs
/_build
/erl_crash.dump
/rebar.lock
/src/oclexer.erl
/src/oclexer_legacy.erl
/src/ocparse.erl
/src/ocparse_legacy.erl
/test/*.beam
/test/generic_*.legacy
/test/generic_*.tst
/test/wwe.legacy
/test/wwe.tst
/test/generic_*_SUITE.erl
/test/wwe.*
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@ notifications:
email:
- [email protected]
otp_release:
- 19.1
- 19.0
- 18.3
- 18.2.1
- 18.2
- 18.1
- 18.0
- 17.5
- 17.4
- 17.3
- 17.1
- 17.0
after_success:
rebar ct
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,20 @@ This project was inspired by the [sqlparse](https://github.com/K2InformaticsGmbH

## 6. Release Notes

### Version 1.2.2

Release Date: 11.11.2016 - Grammar as of 10.11.2016

#### Grammar changes

There are no relevant grammar changes available.

#### New features

- Support of rebar3.

----------

### Version 1.2.1

Release Date: 03.10.2016 - Grammar as of 02.10.2016
Expand Down
1 change: 1 addition & 0 deletions cover.spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{level, details}.
{incl_app, ocparse, details}.
{excl_mods, ocparse, [app_SUITE]}.
{incl_dirs_r, ["src"]}.
Expand Down
49 changes: 0 additions & 49 deletions ct/start_sel.bat

This file was deleted.

47 changes: 0 additions & 47 deletions ct/start_sel.sh

This file was deleted.

28 changes: 0 additions & 28 deletions ct/start_spec.bat

This file was deleted.

27 changes: 0 additions & 27 deletions ct/start_spec.sh

This file was deleted.

51 changes: 41 additions & 10 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
%% -*- mode: erlang -*-
%% ex: ft=erlang
{cover_enabled, true}.

{ct_cover, true}.
{ct_verbose, true}.

{dialyzer_plt_location, local}.
{dialyzer_warnings, [error_handling,
overspecs,
race_conditions,
specdiffs,
underspecs,
unknown,
unmatched_returns
]}.

{eunit_opts, [
{skip_deps, true},
verbose
]}.
{eunit_exclude_deps, true}.

{profiles, [
{prod, [
{erl_opts, [no_debug_info,
warnings_as_errors]}
]},
{test, [
{erl_opts, [debug_info]}
]}
]}.

{xref_checks, [
deprecated_functions,
deprecated_function_calls,
exports_not_used,
locals_not_used,
undefined_functions,
undefined_function_calls
]}.

{xrl_opts, [dfa_graph, verbose]}.

{yrl_opts, [verbose]}.
{eunit_opts, [verbose, {skip_deps, true}]}.
{eunit_exclude_deps, true}.
{cover_enabled, true}.
{xref_checks, [undefined_function_calls, undefined_functions,
locals_not_used, exports_not_used,
deprecated_function_calls, deprecated_functions]}.
{ct_dir, "ct"}.
{ct_log_dir, "ct/logs"}.
2 changes: 1 addition & 1 deletion src/test_generator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
-define(MAX_RULE_ATOM, 1000).
-define(MAX_RULE_EXPRESSION, 2000).
-define(MAX_STATEMENT, 1000).
-define(PATH_CT, "ct").
-define(PATH_CT, "test").
-define(PATH_EUNIT, "test").
-define(PRIME, 37).
-define(RIGHT_ARROW_HEAD, ">").
Expand Down
Binary file removed test/Templates.xlsx
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/ocparse_legacy_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cypher_test_() ->
end,
io:format(user, "File = ~s, Logs = ~p~n", [WCard, Logs]),
{ok, Cwd} = file:get_cwd(),
[_ | RootPath] = lists:reverse(filename:split(Cwd)),
RootPath = lists:reverse(filename:split(Cwd)),
TestDir = filename:join(lists:reverse(["test" | RootPath])),
TestFiles = lists:sort([filename:join(TestDir, T)
|| T <- filelib:wildcard(WCard, TestDir)]),
Expand Down
13 changes: 9 additions & 4 deletions test/ocparse_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cypher_test_() ->
Cypher when is_list(Cypher) -> Cypher;
_ -> "*"
end ++ ".tst",
% ?debugFmt("wwe debugging cypher_test_ ===> ~n WCard: ~p~n", [WCard]),
Logs = case os:getenv("LOG") of
V when length(V) > 0 ->
case lists:map(
Expand All @@ -24,10 +25,14 @@ cypher_test_() ->
end,
io:format(user, "File = ~s, Logs = ~p~n", [WCard, Logs]),
{ok, Cwd} = file:get_cwd(),
[_ | RootPath] = lists:reverse(filename:split(Cwd)),
% ?debugFmt("wwe debugging cypher_test_ ===> ~n Cwd: ~p~n", [Cwd]),
RootPath = lists:reverse(filename:split(Cwd)),
% ?debugFmt("wwe debugging cypher_test_ ===> ~n RootPath: ~p~n", [RootPath]),
TestDir = filename:join(lists:reverse(["test" | RootPath])),
% ?debugFmt("wwe debugging cypher_test_ ===> ~n TestDir: ~p~n", [TestDir]),
TestFiles = lists:sort([filename:join(TestDir, T)
|| T <- filelib:wildcard(WCard, TestDir)]),
% ?debugFmt("wwe debugging cypher_test_ ===> ~n TestFiles: ~p~n", [TestFiles]),
group_gen(TestFiles, Logs).

group_gen(TestFiles, Logs) ->
Expand Down Expand Up @@ -116,16 +121,16 @@ tests_gen(TestGroup, [{I, T} | Tests], Logs, SelTests, Acc) ->
test_cypher(TestGroup, Test, Logs) ->
?D1("~n ~s", [Test]),
%?debugFmt("~n", []),
%?debugFmt("wwe debugging test_cypher/3 ===> ~n Test: ~p~n", [Test]),
%?debugFmt("wwe debugging test_cypher ===> ~n Test: ~p~n", [Test]),
case ocparse:parsetree_with_tokens(Test) of
{ok, {ParseTree, Tokens}} ->
%?debugFmt("wwe debugging test_cypher/3 ===> ~n ParseTree: ~p~n Tokens: ~p~n", [ParseTree, Tokens]),
%?debugFmt("wwe debugging test_cypher ===> ~n ParseTree: ~p~n Tokens: ~p~n", [ParseTree, Tokens]),
?D2("~n~p", [ParseTree]),
NCypher = case ocparse:parsetree_to_string_td(ParseTree) of
{error, Error} ->
throw({error, Error});
NS ->
%?debugFmt("wwe debugging test_cypher/3 ===> ~n NS: ~p~n", [NS]),
%?debugFmt("wwe debugging test_cypher ===> ~n NS: ~p~n", [NS]),
NS
end,
?D3("~n ~ts~n", [NCypher]),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,10 @@ test_neo4j_6_7_lists(_Config) ->
octest:ct_string(Cypher_02),
Cypher_03 = "RETURN range(0,10)[-3]",
octest:ct_string(Cypher_03),
Cypher_04 = "RETURN range(0,10)[0..3]",
_Cypher_04 = "RETURN range(0,10)[0..3]",
% wwe ??? range literal
%octest:ct_string(Cypher_04),
Cypher_05 = "RETURN range(0,10)[0..5]",
_Cypher_05 = "RETURN range(0,10)[0..5]",
% wwe ??? signed integer
% wwe ??? range literal
%octest:ct_string(Cypher_05),
Expand All @@ -399,10 +399,10 @@ test_neo4j_6_7_lists(_Config) ->
octest:ct_string(Cypher_07),
Cypher_08 = "RETURN range(0,10)[15]",
octest:ct_string(Cypher_08),
Cypher_09 = "RETURN range(0,10)[5..15]",
_Cypher_09 = "RETURN range(0,10)[5..15]",
% wwe ??? range literal
%octest:ct_string(Cypher_09),
Cypher_10 = "RETURN size(range(0,10)[0..3])",
_Cypher_10 = "RETURN size(range(0,10)[0..3])",
% wwe ??? range literal
%octest:ct_string(Cypher_10),
Cypher_11 = "RETURN [x IN range(0,10) WHERE x % 2 = 0 | x^3] AS result",
Expand Down Expand Up @@ -632,7 +632,7 @@ test_neo4j_8_1_match(_Config) ->
Cypher_13 = "MATCH (martin { name:'Charlie Sheen' })-[:ACTED_IN*1..3]-(movie:Movie)
RETURN movie.title",
octest:ct_string(Cypher_13),
Cypher_14 = "MATCH (actor { name:'Charlie Sheen' })-[r:ACTED_IN*2]-(co_actor)
_Cypher_14 = "MATCH (actor { name:'Charlie Sheen' })-[r:ACTED_IN*2]-(co_actor)
RETURN r",
% octest:ct_string(Cypher_14), % not supported by openCypher ???
Cypher_15 = "MATCH (charlie:Person { name:'Charlie Sheen' }),(martin:Person { name:'Martin Sheen' })
Expand Down Expand Up @@ -1460,7 +1460,7 @@ test_neo4j_13_4_row_operators(_Config) ->
Cypher_13 = "UNWIND range(1,5) AS value
RETURN value;",
octest:ct_string(Cypher_13),
Cypher_14 = "CALL db.labels() YIELD label
_Cypher_14 = "CALL db.labels() YIELD label
RETURN *
ORDER BY label".
% octest:ct_string(Cypher_14). % not supported by openCypher
Expand Down
Loading

0 comments on commit ffcac04

Please sign in to comment.