emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/org-drill 939f2a65b2 114/251: Enable cask testing


From: ELPA Syncer
Subject: [nongnu] elpa/org-drill 939f2a65b2 114/251: Enable cask testing
Date: Mon, 17 Jan 2022 18:59:07 -0500 (EST)

branch: elpa/org-drill
commit 939f2a65b2e5097d56d3c4422aa3a11e4d71d6ff
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>

    Enable cask testing
    
     - Update headers to standard
     - Add Makefile, Cask and docker scripts
     - Add test directory
     - .gitignore
---
 .gitignore             |  1 +
 Cask                   |  8 +++++
 Makefile               | 36 +++++++++++++++++++
 org-drill.el           | 97 +++++++++++++++++++++++++++-----------------------
 test-by-cp             |  9 +++++
 test-from-git          |  7 ++++
 test/org-drill-test.el | 32 +++++++++++++++++
 7 files changed, 145 insertions(+), 45 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..176df11369
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/.cask
diff --git a/Cask b/Cask
new file mode 100644
index 0000000000..e0eabf8575
--- /dev/null
+++ b/Cask
@@ -0,0 +1,8 @@
+(source gnu)
+(source melpa)
+(source org)
+
+(package-file "org-drill.el")
+
+(development
+ (depends-on "assess" "org-mode-plus-contrib"))
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..68a9ccf44b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+EMACS ?= emacs
+CASK ?= cask
+
+-include makefile-local
+
+ifdef EMACS
+EMACS_ENV=EMACS=$(EMACS)
+endif
+
+all:
+
+install:
+       $(EMACS_ENV) $(CASK) install
+
+test: install just-test
+
+just-test:
+       $(EMACS_ENV) $(CASK) emacs --batch -q \
+       --directory=. \
+       --load assess-discover.el \
+       --eval '(assess-discover-run-and-exit-batch t)'
+
+DOCKER_TAG=26
+test-cp:
+       docker run -it --rm --name docker-cp -v $(PWD):/usr/src/app -w 
/usr/src/app --entrypoint=/bin/bash  silex/emacs:$(DOCKER_TAG)-dev ./test-by-cp
+
+test-git:
+       docker run -it --rm --name docker-git -v $(PWD):/usr/src/app -w 
/usr/src/app --entrypoint=/bin/bash  silex/emacs:$(DOCKER_TAG)-dev 
./test-from-git
+
+docker-test:
+       $(MAKE) test-git DOCKER_TAG=26.2
+       $(MAKE) test-cp DOCKER_TAG=26.2
+       $(MAKE) test-git DOCKER_TAG=25.3
+       $(MAKE) test-cp DOCKER_TAG=25.3
+
+.PHONY: test
diff --git a/org-drill.el b/org-drill.el
index 4bc8dde351..1d47aa0747 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -1,48 +1,54 @@
-;;; -*- coding: utf-8-unix -*-
-;;; org-drill.el - Self-testing using spaced repetition
-;;;
-;;; Copyright (C) 2010-2015  Paul Sexton
-;;;
-;;; Author: Paul Sexton <eeeickythump@gmail.com>
-;;; Version: 2.6.1
-;;; Keywords: flashcards, memory, learning, memorization
-;;; Repository at http://bitbucket.org/eeeickythump/org-drill/
-;;;
-;;; This file is not part of GNU Emacs.
-;;;
-;;; This program 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.
-;;;
-;;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
-;;;
-;;;
-;;; Synopsis
-;;; ========
-;;;
-;;; Within an Org mode outline or outlines, headings and associated content are
-;;; treated as "flashcards". Spaced repetition algorithms are used to conduct
-;;; interactive "drill sessions", where a selection of these flashcards is
-;;; presented to the student in random order. The student rates his or her
-;;; recall of each item, and this information is used to schedule the item for
-;;; later revision.
-;;;
-;;; Each drill session can be restricted to topics in the current buffer
-;;; (default), one or several files, all agenda files, or a subtree. A single
-;;; topic can also be tested.
-;;;
-;;; Different "card types" can be defined, which present their information to
-;;; the student in different ways.
-;;;
-;;; See the file README.org for more detailed documentation.
+;;; org-drill.el --- Self-testing using spaced repetition -*- coding: 
utf-8-unix -*-
 
+;;; Header:
+
+;; Maintainer: Phillip Lord <phillip.lord@russet.org.uk>
+;; Author: Paul Sexton <eeeickythump@gmail.com>
+;; Version: 2.7
+;; Package-Requires: ((emacs "25.3") (seq "2.14"))
+;; Keywords: flashcards, memory, learning, memorization
+;; Repository at https://gitlab.com/phillord/org-drill/issues
+;;
+;; This file is not part of GNU Emacs.
+;;
+;; Copyright (C) 2018-2019 Phillip Lord
+;; Copyright (C) 2010-2015 Paul Sexton
+;;
+;;
+;; This program 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.
+;;
+;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+;;
+;;
+
+;;; Commentary:
+;;
+;; Within an Org mode outline or outlines, headings and associated content are
+;; treated as "flashcards".  Spaced repetition algorithms are used to conduct
+;; interactive "drill sessions", where a selection of these flashcards is
+;; presented to the student in random order.  The student rates his or her
+;; recall of each item, and this information is used to schedule the item for
+;; later revision.
+;;
+;; Each drill session can be restricted to topics in the current buffer
+;; (default), one or several files, all agenda files, or a subtree.  A single
+;; topic can also be tested.
+;;
+;; Different "card types" can be defined, which present their information to
+;; the student in different ways.
+;;
+;; See the file README.org for more detailed documentation.
+
+;;; Code:
 
 (eval-when-compile (require 'cl))
 (eval-when-compile (require 'hi-lock))
@@ -50,7 +56,7 @@
 (require 'hi-lock)
 (require 'org)
 (require 'org-id)
-(require 'org-learn)
+;;(require 'org-learn)
 (require 'savehist)
 
 (require 'seq)
@@ -3996,3 +4002,4 @@ shuffling is done in place."
   (sit-for 0.3))
 
 (provide 'org-drill)
+;;; org-drill.el ends here
diff --git a/test-by-cp b/test-by-cp
new file mode 100644
index 0000000000..9b73f56ed7
--- /dev/null
+++ b/test-by-cp
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd ..
+mkdir copy
+cd copy
+cp -rf ../app/* .
+rm makefile-local
+
+make test
diff --git a/test-from-git b/test-from-git
new file mode 100644
index 0000000000..681f81eb31
--- /dev/null
+++ b/test-from-git
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+cd ..
+mkdir git
+cd git
+git clone ../app .
+make test
\ No newline at end of file
diff --git a/test/org-drill-test.el b/test/org-drill-test.el
new file mode 100644
index 0000000000..74df0272eb
--- /dev/null
+++ b/test/org-drill-test.el
@@ -0,0 +1,32 @@
+;;; lentic-test.el --- Tests
+
+;;; Header:
+
+;; This file is not part of Emacs
+
+;; Author: Phillip Lord <phillip.lord@russet.org.uk>
+;; Maintainer: Phillip Lord <phillip.lord@russet.org.uk>
+
+;; The contents of this file are subject to the GPL License, Version 3.0.
+
+;; Copyright (C) 2014, 2015, 2016, Phillip Lord, Newcastle University
+
+;; This program 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.
+
+;; This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'org-drill)
+
+(ert-deftest hello-world ()
+  (should t))



reply via email to

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