Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following script, to be named guiletap.scm, implements the frequently-needed functions for using the TAP protocol when running tests.</p> <pre>; Define functions for running Guile-written tests under the TAP protocol. ; Copyright &#169; 2008 by Omer Zak ; Released under the GNU LGPL 2.1 or (at your option) any later version. ;;; ;;; To invoke it: ;;; (use-modules (guiletap)) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define-module (guiletap)) (export plan) (export ok) (export bail_out) (export diag) (export is_ok) (use-modules (ice-9 format)) ; n is the number of tests. (define plan (lambda (n) (display (format "1..~d~%" n)))) ; n - test number ; testdesc - test descriptor ; res - result which is #f at failure, other at success. (define ok (lambda (n testdesc res) (if (not res)(display "not ")) (display (format "ok ~d - ~a~%" n testdesc)))) ; testdesc - test descriptor (define bail_out (lambda (testdesc) (display (format "Bail out! - ~a~%" testdesc)))) ; diagmsg - diagnostic message (define diag (lambda (diagmsg) (display (format "# ~a~%" diagmsg)))) ; n - test number ; testdesc - test descriptor ; expres - expected test result ; actres - actual test result (define is_ok (lambda (n testdesc expres actres) (ok n testdesc (equal? expres actres)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; !!! TODO: ; !!! To be implemented also: ; plan_no_plan ; plan_skip_all [REASON] ; ; is RESULT EXPECTED [NAME] ; isnt RESULT EXPECTED [NAME] ; like RESULT PATTERN [NAME] ; unlike RESULT PATTERN [NAME] ; pass [NAME] ; fail [NAME] ; ; skip CONDITION [REASON] [NB_TESTS=1] ; Specify TODO mode by setting $TODO: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; End of guiletap.scm</pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload