diff options
author | Eric <[email protected]> | 2012-10-23 09:49:06 -0500 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2012-10-24 11:30:00 -0600 |
commit | d880e6e385ac49ecfe67449a25c1fd95b4e1f882 (patch) | |
tree | 475033c35342f91e926cbed7dbd3354e0d71b722 /test/rclt_goal.erl | |
parent | fa52e19b4990a17eb7efbafc0364c0c686d7b770 (diff) | |
download | relx-d880e6e385ac49ecfe67449a25c1fd95b4e1f882.tar.gz relx-d880e6e385ac49ecfe67449a25c1fd95b4e1f882.tar.bz2 relx-d880e6e385ac49ecfe67449a25c1fd95b4e1f882.zip |
fix bug in goal parsing and handling
Signed-off-by: Jordan Wilberding <[email protected]>
Diffstat (limited to 'test/rclt_goal.erl')
-rw-r--r-- | test/rclt_goal.erl | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/rclt_goal.erl b/test/rclt_goal.erl index 9fd31ae..9bf6028 100644 --- a/test/rclt_goal.erl +++ b/test/rclt_goal.erl @@ -23,35 +23,35 @@ -include_lib("eunit/include/eunit.hrl"). parse_test() -> - ?assertMatch({ok, <<"getopt">>}, + ?assertMatch({ok, getopt}, rcl_goal:parse("getopt")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, '='}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, '='}}, rcl_goal:parse("getopt=0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, '='}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, '='}}, rcl_goal:parse("getopt:0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, '='}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, '='}}, rcl_goal:parse("getopt-0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, gte}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, gte}}, rcl_goal:parse("getopt >= 0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, gte}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, gte}}, rcl_goal:parse("getopt:gte:0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, gt}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, gt}}, rcl_goal:parse("getopt>0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, gt}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, gt}}, rcl_goal:parse("getopt:gt:0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, lte}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, lte}}, rcl_goal:parse("getopt<= 0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, lte}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, lte}}, rcl_goal:parse("getopt:lte:0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, lt}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, lt}}, rcl_goal:parse("getopt<0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, pes}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, pes}}, rcl_goal:parse("getopt ~>0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, pes}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, pes}}, rcl_goal:parse("getopt: pes:0.5.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, {{0,6,1},{[],[]}}, between}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, {{0,6,1},{[],[]}}, between}}, rcl_goal:parse("getopt:btwn:0.5.1,0.6.1")), - ?assertMatch({ok, {<<"getopt">>, {{0,5,1},{[],[]}}, {{0,6,1},{[],[]}}, between}}, + ?assertMatch({ok, {getopt, {{0,5,1},{[],[]}}, {{0,6,1},{[],[]}}, between}}, rcl_goal:parse("getopt:between :0.5.1,0.6.1")). fail_test() -> |