TINKERPOP-1784 Added feature tests for simplePath()
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/c24d5b40 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/c24d5b40 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/c24d5b40 Branch: refs/heads/master Commit: c24d5b40746950c28c02fef97da27cb95abf687b Parents: d11787a Author: Stephen Mallette <sp...@genoprime.com> Authored: Tue Oct 24 12:46:26 2017 -0400 Committer: Stephen Mallette <sp...@genoprime.com> Committed: Tue Nov 21 15:52:52 2017 -0500 ---------------------------------------------------------------------- gremlin-test/features/filter/SimplePath.feature | 69 ++++++++++++++++++++ 1 file changed, 69 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c24d5b40/gremlin-test/features/filter/SimplePath.feature ---------------------------------------------------------------------- diff --git a/gremlin-test/features/filter/SimplePath.feature b/gremlin-test/features/filter/SimplePath.feature new file mode 100644 index 0000000..c8091af --- /dev/null +++ b/gremlin-test/features/filter/SimplePath.feature @@ -0,0 +1,69 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Step - simplePath() + + Scenario: g_VX1X_outXcreatedX_inXcreatedX_simplePath + Given the modern graph + And using the parameter v1Id defined as "v[marko].id" + And the traversal of + """ + g.V(v1Id).out("created").in("created").simplePath() + """ + When iterated to list + Then the result should be unordered + | v[josh] | + | v[peter] | + + Scenario: get_g_V_repeatXboth_simplePathX_timesX3X_path + Given the modern graph + And the traversal of + """ + g.V().repeat(__.both().simplePath()).times(3).path() + """ + When iterated to list + Then the result should be unordered + | p[v[marko],v[lop],v[josh],v[ripple]] | + | p[v[marko],v[josh],v[lop],v[peter]] | + | p[v[vadas],v[marko],v[lop],v[josh]] | + | p[v[vadas],v[marko],v[lop],v[peter]] | + | p[v[vadas],v[marko],v[josh],v[ripple]] | + | p[v[vadas],v[marko],v[josh],v[lop]] | + | p[v[lop],v[marko],v[josh],v[ripple]] | + | p[v[lop],v[josh],v[marko],v[vadas]] | + | p[v[josh],v[lop],v[marko],v[vadas]] | + | p[v[josh],v[marko],v[lop],v[peter]] | + | p[v[ripple],v[josh],v[lop],v[marko]] | + | p[v[ripple],v[josh],v[lop],v[peter]] | + | p[v[ripple],v[josh],v[marko],v[lop]] | + | p[v[ripple],v[josh],v[marko],v[vadas]] | + | p[v[peter],v[lop],v[marko],v[vadas]] | + | p[v[peter],v[lop],v[marko],v[josh]] | + | p[v[peter],v[lop],v[josh],v[ripple]] | + | p[v[peter],v[lop],v[josh],v[marko]] | + + Scenario: get_g_V_asXaX_out_asXbX_out_asXcX_simplePath_byXlabelX_fromXbX_toXcX_path_byXnameX + Given the modern graph + And using the parameter v1Id defined as "v[marko].id" + And the traversal of + """ + g.V().as("a").out().as("b").out().as("c").simplePath().by(T.label).from("b").to("c").path().by("name") + """ + When iterated to list + Then the result should be unordered + | p[marko,josh,ripple] | + | p[marko,josh,lop] |