artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A test suite that use a lib


From: Jérémy Korwin-Zmijowski
Subject: A test suite that use a lib
Date: Tue, 27 Apr 2021 09:26:07 +0200
User-agent: Evolution 3.34.2

Hey Artanis !

   $ art version
   GNU Artanis is a lightweight web framework written in Guile Scheme.
    
   Copyright (C) 2013~2015 Mu Lei known as NalaGinrut

   GPLv3+ & LGPLv3+
   NalaGinrut <mulei@gnu.org>
   Version: GNU Artanis-0.4.1.
   God bless hacking.

In my application created with `art create`, I want to write some tests
against a lib I created with `art draw lib` but the test file does not
see the lib module.

`no code for module (ynm ingredients)`

Here is my test folder content :

test
├── benchmark
├── functional
└── unit
    └── ingredients-test.scm

Here is the content of my test file :

   (use-modules (spec)
             (ynm ingredients)
             (dsv))

   (describe "ingredients-available"
     (it "reads an empty csv file"
       (let ([csv (call-with-input-file "empty-csv"
                 (cut dsv->scm ))])
         (should= "empty list" '() csv))))

Here is my lib folder content :

lib/
└── ynm
    └── ingredients.scm

Here is the content of my lib file :

   ;;;; This lib file was generated by GNU Artanis, please add your
   license header below.
   ;;;; And please respect the freedom of other people, please.
   ;;;; <YOUR LICENSE HERE>

   (define-module (ynm ingredients)
     ;;#:use-module (uncomment_to_add_your_imported_module_here)
     ;;#:export (#;uncomment_to_add_your_exported_stuffs_here)
     )

   (define-public (ingredients-list)
     (list "Tomatoes" "Potatoes" "Carrots" "Mash" "Apples"))


Any hints ?

Cheers,
Jérémy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]