Just a commit with stuff
This commit is contained in:
parent
f6fa2a0031
commit
3bfcfcc4eb
17
gherken.scm
17
gherken.scm
|
@ -15,6 +15,7 @@
|
||||||
srfi-69
|
srfi-69
|
||||||
srfi-78
|
srfi-78
|
||||||
srfi-123
|
srfi-123
|
||||||
|
srfi-133
|
||||||
srfi-152
|
srfi-152
|
||||||
srfi-197)
|
srfi-197)
|
||||||
(export given run-features)
|
(export given run-features)
|
||||||
|
@ -26,9 +27,18 @@
|
||||||
((given picklex args ...)
|
((given picklex args ...)
|
||||||
(hash-table-set! lang-registry picklex (lambda args ...)))))
|
(hash-table-set! lang-registry picklex (lambda args ...)))))
|
||||||
|
|
||||||
(define (run-pickle data tags)
|
(define (run-step data)
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
|
(define (run-pickle data tags)
|
||||||
|
(vector-map
|
||||||
|
(lambda (chunk)
|
||||||
|
(vector-map
|
||||||
|
(lambda (step)
|
||||||
|
(run-step data))
|
||||||
|
(alist-ref 'steps chunk)))
|
||||||
|
data)))
|
||||||
|
|
||||||
(define (run-feature filename tags)
|
(define (run-feature filename tags)
|
||||||
(let ((pickles (chain (capture ("./gherkinexe" "--no-ast" "--no-source" filename))
|
(let ((pickles (chain (capture ("./gherkinexe" "--no-ast" "--no-source" filename))
|
||||||
(string-trim-both _)
|
(string-trim-both _)
|
||||||
|
@ -36,8 +46,9 @@
|
||||||
(string-join _ ", ")
|
(string-join _ ", ")
|
||||||
(list "[" _ "]")
|
(list "[" _ "]")
|
||||||
(string-concatenate _)
|
(string-concatenate _)
|
||||||
(with-input-from-string _ read-json))))
|
(with-input-from-string _ read-json)
|
||||||
(map
|
(vector-map (lambda (x) (alist-ref 'pickle x)) _))))
|
||||||
|
(vector-map
|
||||||
(lambda (x) (run-pickle x tags))
|
(lambda (x) (run-pickle x tags))
|
||||||
pickles)))
|
pickles)))
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
(chicken port))
|
(chicken port))
|
||||||
|
|
||||||
(define pickle
|
(define pickle
|
||||||
(chain (capture ("./gherkinexe" "--no-ast" "--no-source" "cucumber/gherkin/c/testdata/good/tags.feature"))
|
(chain (capture ("./gherkinexe" "--no-ast" "--no-source" "cucumber/gherkin/c/testdata/good/rule.feature"))
|
||||||
(string-trim-both _)
|
(string-trim-both _)
|
||||||
(string-split _ "\n")
|
(string-split _ "\n")
|
||||||
(string-join _ ", ")
|
(string-join _ ", ")
|
||||||
|
|
Loading…
Reference in New Issue