;; Tests of various ways that the beastie program is called. ;; ;; This is currently quite far from complete as an interface test. ;; ;; This file is part of Beastie ;; SPDX-FileCopyrightText: 2025 Norman Gray ;; SPDX-License-Identifier: BSD-2-Clause (module "s7unit.scm" 'json 'unicode) ;; the following locale setting is a no-op when we're not using ;; ICU, but with it, the POSIX order ensures that uppercase sorts ;; before lower (unicode-set-locale! "en_US_POSIX") ;to ensure the sort happens predictably (define (grep re file) (with-input-from-file file (λ () (let loop ((l (read-line)) (res '())) (cond ((eof-object? l) (reverse! res)) ((regexp-match? re l) (loop (read-line) (cons l res))) (else (loop (read-line) res))))))) (test-suite "beastie calls" (let* ((bib-output (subprocess "../beastie" "bib-t01-simple.bib")) (bib-form (with-input-from-string bib-output read))) (assert-equal (sort! (map car bib-form) symbol