Just a commit with stuff

This commit is contained in:
Daniel Ziltener 2021-04-13 04:09:26 +02:00
parent f6fa2a0031
commit 3bfcfcc4eb
2 changed files with 36 additions and 25 deletions

View File

@ -15,6 +15,7 @@
srfi-69
srfi-78
srfi-123
srfi-133
srfi-152
srfi-197)
(export given run-features)
@ -26,9 +27,18 @@
((given picklex args ...)
(hash-table-set! lang-registry picklex (lambda args ...)))))
(define (run-pickle data tags)
(define (run-step data)
#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)
(let ((pickles (chain (capture ("./gherkinexe" "--no-ast" "--no-source" filename))
(string-trim-both _)
@ -36,8 +46,9 @@
(string-join _ ", ")
(list "[" _ "]")
(string-concatenate _)
(with-input-from-string _ read-json))))
(map
(with-input-from-string _ read-json)
(vector-map (lambda (x) (alist-ref 'pickle x)) _))))
(vector-map
(lambda (x) (run-pickle x tags))
pickles)))

View File

@ -11,7 +11,7 @@
(chicken port))
(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-split _ "\n")
(string-join _ ", ")