[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/parseclj 2d10ef3742 002/185: Travis CI / test setup
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/parseclj 2d10ef3742 002/185: Travis CI / test setup |
Date: |
Tue, 28 Dec 2021 14:05:07 -0500 (EST) |
branch: elpa/parseclj
commit 2d10ef3742a154383ba0a312eabf123dd909931f
Author: Arne Brasseur <arne@arnebrasseur.net>
Commit: Arne Brasseur <arne@arnebrasseur.net>
Travis CI / test setup
---
.travis.yml | 9 +++++++++
bin/run-tests | 2 ++
clj-parse.el | 28 ++++++++++++++++++----------
3 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..434e4e6d0e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,9 @@
+language: emacs-lisp
+before_install:
+ - sudo add-apt-repository -y ppa:ubuntu-elisp
+ - sudo apt-get update -qq
+ - sudo apt-get install -qq emacs-snapshot
+
+script:
+ - make cask
+ - make test
diff --git a/bin/run-tests b/bin/run-tests
new file mode 100755
index 0000000000..2171b799f7
--- /dev/null
+++ b/bin/run-tests
@@ -0,0 +1,2 @@
+#!/bin/sh
+emacs -batch -l ert -l clj-parse.el -f ert-run-tests-batch-and-exit
\ No newline at end of file
diff --git a/clj-parse.el b/clj-parse.el
index d7bb094690..631df0d663 100644
--- a/clj-parse.el
+++ b/clj-parse.el
@@ -4,7 +4,7 @@
;; Author: Arne Brasseur <arne@arnebrasseur.net>
;; Keywords: lisp
-;; Package-Requires: ((dash "") (let-alist ""))
+;; Package-Requires: ((let-alist ""))
;; This program is free software; you can redistribute it and/or modify it
under
;; the terms of the Mozilla Public License Version 2.0
@@ -23,6 +23,12 @@
;;; Code:
+;; for (case ...)
+(eval-when-compile (require 'cl))
+
+;; Before emacs 25.1 it's an ELPA package
+(require 'let-alist)
+
(defun clj-parse ()
(clj-parse* 'clj-parse-elisp-reducer))
@@ -36,8 +42,8 @@
(let ((stack nil)
(token (clj-lex-next)))
(while (not (eq (alist-get 'type token) :eof))
- ;;(prin1 (alist-get 'type token))
- (print token)
+ ;; (prin1 (alist-get 'type token))
+ ;; (print token)
;; (print stack)
(let-alist token
(case .type
@@ -52,7 +58,7 @@
(while (not (and (listp (car stack)) (eq (alist-get 'type (car
stack)) :lparen)))
(push (pop stack) list))
(pop stack) ;; :lparen
- (print list)
+ ;; (print list)
(push (funcall reducer :list list) stack)))))
(setq token (clj-lex-next)))
stack))
@@ -70,10 +76,11 @@
(defun clj-lex-number ()
(let* ((pos (point)))
- (while (or (<= ?0 (char-after (point)) ?9)
- (eq (char-after (point)) ?.)
- (eq (char-after (point)) ?M)
- (eq (char-after (point)) ?r))
+ (while (and (char-after (point))
+ (or (<= ?0 (char-after (point)) ?9)
+ (eq (char-after (point)) ?.)
+ (eq (char-after (point)) ?M)
+ (eq (char-after (point)) ?r)))
(right-char))
(let* ((num-str (buffer-substring-no-properties pos (point))))
;; TODO handle radix, bignuM
@@ -112,12 +119,12 @@
(with-temp-buffer
(insert "()")
(goto-char 1)
- (should (equal (clj-parse) '())))
+ (should (equal (clj-parse) '(()))))
(with-temp-buffer
(insert "(1)")
(goto-char 1)
- (should (equal (clj-parse) '(1)))))
+ (should (equal (clj-parse) '((1))))))
(ert-deftest clj-lex-next-test ()
(with-temp-buffer
@@ -144,3 +151,4 @@
(provide 'clj-parse)
;;; clj-parse.el ends here
+123
- [nongnu] branch elpa/parseclj created (now a8c4cf30fb), ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 2d10ef3742 002/185: Travis CI / test setup,
ELPA Syncer <=
- [nongnu] elpa/parseclj 01608b7537 007/185: Seriously thinking of sticking to Emacs 25. This is getting ridiculous., ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ee71cb8afe 005/185: Try again for the Travis build, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 4df6ae1bc7 012/185: Travis: only install the necessary ppa/package for each matrix line, 2nd attempt, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj e179a11ec4 016/185: More of trying to appease the mighty gods of Travis, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj d5167bf4ad 021/185: Test/lint stuff, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 22f2eb106f 028/185: Support \uxxxx and \oxxx escape codes in strings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 343052c01a 014/185: Add linting to the build, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 07739abe2c 030/185: support keywords, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj ced0b91c08 029/185: "Support" namespaces symbols, ELPA Syncer, 2021/12/28
- [nongnu] elpa/parseclj 1eef0b62c8 034/185: Support #_discard forms, ELPA Syncer, 2021/12/28