1 ;;; fuel-tests.el -- unit tests for fuel -*- lexical-binding: t -*-
3 ;; Copyright (C) 2014 Björn Lindqvist
4 ;; See http://factorcode.org/license.txt for BSD license.
6 ;; Author: Björn Lindqvist <bjourne@gmail.com>
7 ;; Keywords: languages, fuel, factor
8 ;; Start date: Sat Nov 01, 2014
12 ;; Run the test suite using M-x ert RET t RET or:
14 ;; emacs -batch -l ert -l misc/fuel/fuel-tests.el \
15 ;; -f ert-run-tests-batch-and-exit
19 ;; Load fuel from the same directory the tests are in.
20 (add-to-list 'load-path (file-name-directory load-file-name))
24 (require 'fuel-markup)
28 (ert-deftest print-str ()
29 (should (equal (fuel-markup--print-str "hello") "hello")))
31 (ert-deftest quotation ()
32 (let ((quot '($quotation (effect ("args" "kw") ("ret") nil nil nil))))
35 (fuel-markup--quotation quot)
37 "a quotation with stack effect ( args kw -- ret )"))))
40 (ert-deftest find-in-w/vocabulary ()
43 (insert "Vocabulary: imap")
47 (ert-deftest find-in-w/buffer-link ()
50 (setq fuel-help--buffer-link '("foob" "foob" vocab))
51 (insert "Help page contents")
56 (ert-deftest fuel-xref-name ()
57 (should (equal (buffer-name (fuel-xref--buffer)) "*fuel xref*")))