File tree Expand file tree Collapse file tree
src/practitest_firecracker/parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 (:map param)] result]]))
5959 all-params)))
6060
61+ (defn- examples-section-end? [line]
62+ (str/starts-with? (str/lower-case (str/trim line)) " scenario:" ))
63+
6164; ; TODO: tags support ??
6265(defn- extract-scenario-source
6366 [feature-root scenario]
7376
7477 outline?
7578 ; ; For outline need to extract examples as well
76- (let [start-examples (:line (:location (last (:examples scenario))))]
77- ; ; Find end of examples sections - either end of file or empty line
79+ (let [start-examples (:line (:location (first (:examples scenario))))]
80+ ; ; Find end of examples sections - either end of file or new BDD scenario
7881 (loop [i start-examples
7982 coll (seq (drop start-examples feature-source))]
8083 (if coll
8184 (let [line (first coll)]
82- (if (str/blank ? line)
85+ (if (examples-section-end ? line)
8386 i
8487 (recur (inc i) (next coll))))
8588 i)))
Original file line number Diff line number Diff line change @@ -8,7 +8,16 @@ Feature: Identity feature
88 Then I will get result <result> every time
99
1010 Examples :
11+
1112 | arg | result |
1213 | "First Item " | "First Item " |
1314 | "Second Item " | "Second 123 " |
1415 | "Third Item " | "Third Item " |
16+
17+ Examples :
18+
19+ | arg | result |
20+ | "Second Part " | "Second Part " |
21+ | "Failure " | "That would fail " |
22+
23+ Scenario : Another schenario just in case
You can’t perform that action at this time.
0 commit comments