diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 77ddc61..ddd01d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -332,6 +332,13 @@ integration-test-oni-json: - package script: make integration-test-oni-json TEST_ARCHIVE=$(realpath bin/) +integration-test-oni-org: + stage: integration-test + image: registry.gitlab.com/ryuslash/emacs-config + dependencies: + - package + script: make integration-test-oni-org TEST_ARCHIVE=$(realpath bin/) + integration-test-oni-paredit: stage: integration-test image: registry.gitlab.com/ryuslash/emacs-config diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index 76332a3..105c787 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0408.205648 -;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna) +;; Version: 2020.0409.113204 +;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets org-edna diminish) ;; 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 @@ -26,6 +26,7 @@ ;;; Code: +(require 'diminish) (require 'hydra) (require 'ob) (require 'ol-man) @@ -307,6 +308,8 @@ _l_: Store link ^^ _j_: Journal entry (with-eval-after-load 'yasnippet (oni-org-snippets-initialize))) +(with-eval-after-load 'org-edna (diminish 'org-edna-mode)) + ;;;###autoload(with-eval-after-load 'org (require 'oni-org)) (provide 'oni-org) diff --git a/test/integration/oni-org.bats b/test/integration/oni-org.bats new file mode 100644 index 0000000..1b20e68 --- /dev/null +++ b/test/integration/oni-org.bats @@ -0,0 +1,31 @@ +#!/usr/bin/env bats + +@test "Opening a .org file loads oni-org" { + run emacs -batch -l package -f package-initialize \ + -visit test.org \ + -eval "(prin1 (featurep 'oni-org))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Loading org-edna diminishes org-edna-mode" { + run emacs -batch -l package -f package-initialize -l subr-x \ + -l org-edna \ + -eval "(prin1 (string-empty-p (car (alist-get 'org-edna-mode minor-mode-alist))))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Reloading org-edna diminishes org-edna-mode" { + run emacs -batch -l package -f package-initialize -l subr-x \ + -l org-edna \ + -eval "(prin1 (string-empty-p (car (alist-get 'org-edna-mode minor-mode-alist))))" + + echo "$output" + + [[ "$output" == *"t" ]] +}