[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-kawa 56b7524 076/119: Add more elisp tests
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-kawa 56b7524 076/119: Add more elisp tests |
Date: |
Sun, 1 Aug 2021 18:30:41 -0400 (EDT) |
branch: elpa/geiser-kawa
commit 56b7524b714f0f57a4150a41f9b6c16afcfa42c3
Author: spellcard199 <spellcard199@protonmail.com>
Commit: spellcard199 <spellcard199@protonmail.com>
Add more elisp tests
---
elisp/tests/test-geiser-kawa.el | 63 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/elisp/tests/test-geiser-kawa.el b/elisp/tests/test-geiser-kawa.el
index dc5a5b9..00ad4ef 100644
--- a/elisp/tests/test-geiser-kawa.el
+++ b/elisp/tests/test-geiser-kawa.el
@@ -1,6 +1,14 @@
+;; Copyright (C) 2019, 2020 spellcard199 <spellcard199@protonmail.com>
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the Modified BSD License. You should
+;; have received a copy of the license along with this program. If
+;; not, see <http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5>.
+
(require 'geiser)
(require 'geiser-mode)
(require 'geiser-kawa)
+(require 'gnus-util)
(defun switch-to-and-reset-scratch-buffer()
(switch-to-buffer "*scratch*")
@@ -11,9 +19,15 @@
"run-kawa"
(before-all
+
+ (print "[test-geiser-kawa.el] Running `mvnw package'...")
+
(let ((mvn-buf (geiser-kawa-deps-mvn-package)))
(while compilation-in-progress
(sleep-for 0 250)))
+
+ (print "[test-geiser-kawa.el] `mvnw package' done.")
+
(setq geiser-kawa-use-included-kawa t)
(switch-to-and-reset-scratch-buffer)
(run-kawa)
@@ -37,4 +51,53 @@
(geiser-eval-buffer))
:to-equal '((result "") (output . "foobar"))))
+ (it "can `geiser:autodoc'"
+ ;; TODO: How to test directly
+ ;; `geiser-autodoc--autodoc-at-point'?
+ ;; Always returns `nil' when run inside the tests.
+ (expect
+ (caar
+ (geiser-eval--send/result
+ (prin1-to-string
+ '(geiser:eval (interaction-environment)
+ "(geiser:autodoc '(display))"))))
+ :to-equal "display"))
+
+ (it "can `macroexpand'"
+ (expect
+ (progn
+ (insert "(when #t 'foo 'bar)")
+ (goto-char (point-max))
+ (geiser-expand-last-sexp)
+ (geiser-debug--with-buffer
+ (buffer-substring-no-properties (point-min) (point-max))))
+ :to-equal "(if #t (begin (quote foo) (quote bar)))"))
+
+ (it "can `geiser:completions'"
+ (expect (geiser-completion--complete "dis" nil))
+ :to-equal '(display disassemble))
+
+ (it "can `geiser-kawa-devutil-complete--get-data'"
+ (expect
+ (cadr (assoc "completion-type"
+ (geiser-kawa-devutil-complete--get-data
+ "(java.lang.String:)" 18))))
+ :to-equal "METHODS")
+
+ (it "can `geiser-kawa-devutil-exprtree--for-expression'"
+ (expect
+ (string-suffix-p "SimpleSymbol)))"
+ (geiser-kawa-devutil-exprtree--for-expression
+ "(display 'foobar)")))
+ :to-equal t)
+
+ (it "can `geiser-kawa-devutil-complete--exprtree'"
+ (expect
+ (string-prefix-p "(Module"
+ (geiser-kawa-devutil-complete--exprtree
+ "(java.lang.String:)" 18)))
+ :to-equal t)
+
)
+
+;;; test-geiser-kawa.el ends here
- [nongnu] elpa/geiser-kawa 2e9138c 034/119: Small refactor + update comment in GeiserEval, (continued)
- [nongnu] elpa/geiser-kawa 2e9138c 034/119: Small refactor + update comment in GeiserEval, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 05e1eaa 029/119: Add initial support for completing java packages, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 5d8256d 041/119: Fix re-importing exception, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 4247497 007/119: Add geiser-kawa.el (project is starting to work), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa f1d6f8d 023/119: Add maven-wrapper, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 0f5c744 016/119: Avoid issues with older Kawa versions when using quickstart.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 5651a3a 031/119: Add message if no completions found, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa cebaa28 042/119: Add test, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 6495077 064/119: Fix: replace lang.getEnvironment() with Environment.user() as default environment, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa b15c4bc 069/119: TODO.org: add todo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 56b7524 076/119: Add more elisp tests,
Philip Kaludercic <=
- [nongnu] elpa/geiser-kawa 0fd7c30 086/119: README.org: update, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa f8cf352 096/119: Update kawa-devutil version + add Random_notes.org, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa df35e6b 099/119: Add unwind-protect in geiser-kawa-deps--run-kawa-unadviced, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 58ef04d 089/119: Add autodoc support for LangObjType, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa d389ebd 092/119: Update README.org, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 4141232 103/119: melpa/melpa#6858 - Avoid "Unused lexical argument" warnings prepending "_" to parameter names, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa c4de6bb 117/119: pom.xml - update kawa-devutil version (adds support for Java 8), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa f0f5441 002/119: README.org - Add mention about difference from geiser-kawa-scheme, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa a42e807 022/119: Fix warnings when running 'mvn package', Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-kawa 088654b 033/119: Fix function definition is void: word-at-point, Philip Kaludercic, 2021/08/01