Gentle first steps

This commit is contained in:
Daniel Ziltener 2021-04-06 18:05:07 +02:00
parent 368f2883f7
commit 87efc1d204
4 changed files with 25 additions and 1 deletions

View File

@ -3,7 +3,8 @@
(synopsis "A Gherkin wrapper")
(category testing)
(license "MIT")
(dependencies r7rs)
(dependencies r7rs json shell utf8 srfi-152)
(test-dependencies srfi-78)
;;(foreign-dependencies)
(components
(program gherkinexe

View File

@ -5,5 +5,7 @@
(define-library (gherken)
(import shell)
(import json)
(import utf8-srfi-152)
(import (chicken port))
(begin
))

4
scripts/salmonella-run.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
salmonella --keep-repo --repo-dir=./petri-dish
salmonella-html-report ./salmonella.log report

17
tests/run.scm Normal file
View File

@ -0,0 +1,17 @@
(import r7rs
srfi-1
utf8
srfi-69
srfi-78
shell
json-abnf
srfi-152
(chicken port))
(define output (capture ("./gherkinexe" "--no-ast" "--no-source" "cucumber/gherkin/c/testdata/good/rule.feature")))
(define outputs (string-split (string-trim-both output) "\n"))
(define json-string (string-concatenate (list "[" (string-join outputs ", ") "]")))
(define pickle #f)
(let* ((pickles (parser json-string))
(pickle (cdar (vector-ref pickles 0))))
(set! pickle pickle))