Move CSS tests to bats
This commit is contained in:
parent
4ef666b6d6
commit
378ef3d590
3 changed files with 18 additions and 42 deletions
|
@ -168,12 +168,6 @@ unit-test-oni-conf:
|
||||||
- package
|
- package
|
||||||
script: make unit-test-oni-conf TEST_ARCHIVE=$(realpath bin/)
|
script: make unit-test-oni-conf TEST_ARCHIVE=$(realpath bin/)
|
||||||
|
|
||||||
unit-test-oni-css:
|
|
||||||
stage: unit-test
|
|
||||||
dependencies:
|
|
||||||
- package
|
|
||||||
script: make unit-test-oni-css TEST_ARCHIVE=$(realpath bin/)
|
|
||||||
|
|
||||||
unit-test-oni-elisp:
|
unit-test-oni-elisp:
|
||||||
stage: unit-test
|
stage: unit-test
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -239,6 +233,13 @@ integration-test-oni-csharp:
|
||||||
- package
|
- package
|
||||||
script: make integration-test-oni-csharp TEST_ARCHIVE=$(realpath bin/)
|
script: make integration-test-oni-csharp TEST_ARCHIVE=$(realpath bin/)
|
||||||
|
|
||||||
|
integration-test-oni-css:
|
||||||
|
stage: integration-test
|
||||||
|
image: registry.gitlab.com/ryuslash/emacs-config
|
||||||
|
dependencies:
|
||||||
|
- package
|
||||||
|
script: make integration-test-oni-css TEST_ARCHIVE=$(realpath bin/)
|
||||||
|
|
||||||
integration-test-oni-bookmark:
|
integration-test-oni-bookmark:
|
||||||
stage: integration-test
|
stage: integration-test
|
||||||
image: registry.gitlab.com/ryuslash/emacs-config
|
image: registry.gitlab.com/ryuslash/emacs-config
|
||||||
|
|
11
test/integration/oni-css.bats
Normal file
11
test/integration/oni-css.bats
Normal file
|
@ -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" ]]
|
||||||
|
}
|
|
@ -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
|
|
Loading…
Reference in a new issue