From 378ef3d590a5227d238281f78b2521ad3dfb915a Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 7 Apr 2020 01:25:23 -0700 Subject: Move CSS tests to bats --- test/integration/oni-css.bats | 11 +++++++++++ test/oni-css-test.el | 36 ------------------------------------ 2 files changed, 11 insertions(+), 36 deletions(-) create mode 100644 test/integration/oni-css.bats delete mode 100644 test/oni-css-test.el (limited to 'test') 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 -;; 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 . - -;;; 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 -- cgit v1.2.3-54-g00ecf