From 743fdb8a79e771cfbd98ed53a66a4d129f8fe2f6 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 27 Nov 2015 20:18:33 -0600 Subject: [PATCH] Add test runner utility from David Thompson --- Makefile.am | 4 ++-- README.md | 2 ++ tests/test-agenda.scm | 8 +++++--- tests/utils.scm | 24 ++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 tests/utils.scm diff --git a/Makefile.am b/Makefile.am index f1ccbc3..bd1587a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -67,5 +67,5 @@ CLEANFILES = \ EXTRA_DIST = \ $(SOURCES) \ $(TESTS) \ - pre-inst-env.in -# tests/utils.scm + pre-inst-env.in \ + tests/utils.scm diff --git a/README.md b/README.md index 4fd7bdf..f98f433 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,5 @@ Software Foundation, with exceptions below: linked, but I can't be sure. If you really care, consider this whole project GPL v3 or later optionally... anyway a COPYING-gplv3.txt is included for these reasons. + - Likewise, there's a single utility in tests/utils.scm from David + Thompson that's under GPLv3 or later. See above. diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index bed9995..06f24f3 100644 --- a/tests/test-agenda.scm +++ b/tests/test-agenda.scm @@ -19,11 +19,12 @@ -s !# -(define-module (tests test-core) +(define-module (tests test-agenda) #:use-module (srfi srfi-64) #:use-module (ice-9 q) #:use-module (ice-9 receive) - #:use-module (eightsync agenda)) + #:use-module (eightsync agenda) + #:use-module (tests utils)) (test-begin "test-agenda") @@ -335,5 +336,6 @@ ;; End tests (test-end "test-agenda") -;; (test-exit) + +(test-exit) diff --git a/tests/utils.scm b/tests/utils.scm new file mode 100644 index 0000000..9ec2760 --- /dev/null +++ b/tests/utils.scm @@ -0,0 +1,24 @@ +;;; Totes taken from dave + +;;; srt2vtt --- SRT to WebVTT converter +;;; Copyright © 2015 David Thompson +;;; +;;; srt2vtt is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; srt2vtt is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with srt2vtt. If not, see . + +(define-module (tests utils) + #:use-module (srfi srfi-64) + #:export (test-exit)) + +(define (test-exit) + (exit (= (test-runner-fail-count (test-runner-current)) 0))) -- 2.31.1