aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-04-07 01:25:23 -0700
committerGravatar Tom Willemse2020-04-07 01:25:23 -0700
commit378ef3d590a5227d238281f78b2521ad3dfb915a (patch)
tree9e8d8ab7ff5ead24a2bf81ef70e9393ecf04b123 /test
parent4ef666b6d646e21b563cae5e5f77d84919a16763 (diff)
downloademacs-config-378ef3d590a5227d238281f78b2521ad3dfb915a.tar.gz
emacs-config-378ef3d590a5227d238281f78b2521ad3dfb915a.zip
Move CSS tests to bats
Diffstat (limited to 'test')
-rw-r--r--test/integration/oni-css.bats11
-rw-r--r--test/oni-css-test.el36
2 files changed, 11 insertions, 36 deletions
diff --git a/test/integration/oni-css.bats b/test/integration/oni-css.bats
new file mode 100644
index 0000000..66c625c
--- /dev/null
+++ b/test/integration/oni-css.bats
@@ -0,0 +1,11 @@
+#!/usr/bin/env bats
+
+@test "Opening a .css file loads oni-css" {
+ run emacs -batch -l package -f package-initialize \
+ -visit test.css \
+ -eval "(prin1 (featurep 'oni-css))"
+
+ echo "$output"
+
+ [[ "$output" == *"t" ]]
+}
diff --git a/test/oni-css-test.el b/test/oni-css-test.el
deleted file mode 100644
index 3ee55e3..0000000
--- a/test/oni-css-test.el
+++ /dev/null
@@ -1,36 +0,0 @@
-;;; oni-css-test.el --- Tests for oni-css -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2019 Tom Willemse
-
-;; Author: Tom Willemse <tom@ryuslash.org>
-;; Keywords: local
-
-;; 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 <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;
-
-;;; Code:
-
-(ert-deftest oni-css-test-autoloads ()
- "Test that ‘oni-css’ gets loaded automatically."
- (should (not (featurep 'oni-css)))
- (require 'css-mode)
- (should (featurep 'oni-css))
- (unload-feature 'oni-css t)
- (unload-feature 'css-mode t))
-
-(provide 'oni-css-test)
-;;; oni-css-test.el ends here