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

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

[nongnu] elpa/parseclj 4367db07aa 061/185: Move tests to tests/, bench t


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj 4367db07aa 061/185: Move tests to tests/, bench to benchmark/
Date: Tue, 28 Dec 2021 14:05:17 -0500 (EST)

branch: elpa/parseclj
commit 4367db07aa00de11c6e775dfc246f943a74594f2
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Arne Brasseur <arne@arnebrasseur.net>

    Move tests to tests/, bench to benchmark/
    
    Also includes some .travis.yml changes as a first attempt to get the build 
going again.
---
 .travis.yml                                  |  1 -
 {tests => benchmark}/speed-comparison.el     |  7 ++++++-
 clj-parse-test-runner.el                     | 13 +++++++++----
 clj-lex-test.el => tests/clj-lex-test.el     |  0
 clj-parse-test.el => tests/clj-parse-test.el | 24 ++++++++++++------------
 5 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a73fa2eddf..0df296acaa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
 language: generic
 dist: trusty
 env:
-  - VERSION=24.3.1 EMACS=emacs PACKAGE=emacs24
   - VERSION=25.2.2 EMACS=emacs-25.2 PACKAGE=emacs25
   - VERSION=25.2.2 EMACS=emacs-25.2 PACKAGE=emacs25 CLJ_PARSE_LINT=true
 
diff --git a/tests/speed-comparison.el b/benchmark/speed-comparison.el
similarity index 82%
rename from tests/speed-comparison.el
rename to benchmark/speed-comparison.el
index 8f315be5d3..b50a405940 100644
--- a/tests/speed-comparison.el
+++ b/benchmark/speed-comparison.el
@@ -1,4 +1,9 @@
-(with-current-buffer (find-file-noselect "/home/arne/tmp/edn2.list")
+;; takes a file containing edn file names, one per line
+;;
+;;    locate *.edn > edn.list
+;;
+;; results end up as edn in *edn-parse-time-results*
+(with-current-buffer (find-file-noselect "edn.list")
   (goto-char 1)
   (while (and (< (point) (point-max)))
     (end-of-line)
diff --git a/clj-parse-test-runner.el b/clj-parse-test-runner.el
index 5ff8202b84..0dca770deb 100644
--- a/clj-parse-test-runner.el
+++ b/clj-parse-test-runner.el
@@ -4,7 +4,7 @@
       '(("gnu" . "https://elpa.gnu.org/packages/";)
         ;;("melpa" . "https://melpa.org/packages/";)
         ("melpa-stable" . "https://stable.melpa.org/packages/";)
-        ))
+        ("plexus-elpa" . "https://plexus.github.io/elpa/";)))
 
 
 (package-initialize)
@@ -15,14 +15,19 @@
   (package-install 'let-alist))
 
 (package-install 'package-lint)
+(pacakge-install 'a)
 (package-install 'dash)
 
-(let ((files '("clj-parse.el" "clj-lex.el" "clj-parse-test.el" 
"clj-lex-test.el"))
-      (pwd (replace-regexp-in-string "\n\\'" "" (shell-command-to-string 
"pwd"))))
+(setq clj-parse-load-files '("clj-parse.el"
+                             "clj-lex.el"
+                             "tests/clj-parse-test.el"
+                             "tests/clj-lex-test.el"))
+
+(let ((pwd (replace-regexp-in-string "\n\\'" "" (shell-command-to-string 
"pwd"))))
 
   (add-to-list 'load-path pwd)
 
-  (dolist (file files)
+  (dolist (file clj-parse-load-files)
     (load (concat pwd "/" file)))
 
   (if (getenv "CLJ_PARSE_LINT")
diff --git a/clj-lex-test.el b/tests/clj-lex-test.el
similarity index 100%
rename from clj-lex-test.el
rename to tests/clj-lex-test.el
diff --git a/clj-parse-test.el b/tests/clj-parse-test.el
similarity index 93%
rename from clj-parse-test.el
rename to tests/clj-parse-test.el
index 1a193def46..f0c53f1941 100644
--- a/clj-parse-test.el
+++ b/tests/clj-parse-test.el
@@ -335,18 +335,18 @@
 (ert-deftest clj-parse-ast-print-chars ()
   (should (equal "(\\newline \\return \\space \\tab \\a \\b \\c \\u0078 
\\o171)"
                  (clj-parse-ast-print '((:node-type . :root)
-            (:position . 0)
-            (:children . (((:node-type . :list)
-                           (:position . 1)
-                           (:children . (((:node-type . :character) (:position 
. 2) (:form . "\\newline") (:value . ?\n))
-                                         ((:node-type . :character) (:position 
. 11) (:form . "\\return") (:value . ?\r))
-                                         ((:node-type . :character) (:position 
. 19) (:form . "\\space") (:value . 32))
-                                         ((:node-type . :character) (:position 
. 26) (:form . "\\tab") (:value . ?\t))
-                                         ((:node-type . :character) (:position 
. 31) (:form . "\\a") (:value . ?a))
-                                         ((:node-type . :character) (:position 
. 34) (:form . "\\b") (:value . ?b))
-                                         ((:node-type . :character) (:position 
. 37) (:form . "\\c") (:value . ?c))
-                                         ((:node-type . :character) (:position 
. 40) (:form . "\\u0078") (:value . ?x))
-                                         ((:node-type . :character) (:position 
. 47) (:form . "\\o171") (:value . ?y))))))))))))
+                                        (:position . 0)
+                                        (:children . (((:node-type . :list)
+                                                       (:position . 1)
+                                                       (:children . 
(((:node-type . :character) (:position . 2) (:form . "\\newline") (:value . 
?\n))
+                                                                     
((:node-type . :character) (:position . 11) (:form . "\\return") (:value . ?\r))
+                                                                     
((:node-type . :character) (:position . 19) (:form . "\\space") (:value . 32))
+                                                                     
((:node-type . :character) (:position . 26) (:form . "\\tab") (:value . ?\t))
+                                                                     
((:node-type . :character) (:position . 31) (:form . "\\a") (:value . ?a))
+                                                                     
((:node-type . :character) (:position . 34) (:form . "\\b") (:value . ?b))
+                                                                     
((:node-type . :character) (:position . 37) (:form . "\\c") (:value . ?c))
+                                                                     
((:node-type . :character) (:position . 40) (:form . "\\u0078") (:value . ?x))
+                                                                     
((:node-type . :character) (:position . 47) (:form . "\\o171") (:value . 
?y))))))))))))
 
 (ert-deftest clj-parse-ast-print-keyword ()
   (should (equal ":foo-bar"



reply via email to

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