Merged with develop
This commit is contained in:
commit
5a2e8d0dd2
|
@ -1,12 +1,20 @@
|
|||
language: emacs-lisp
|
||||
sudo: false
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
env:
|
||||
- EVM_EMACS=emacs-25.1-travis
|
||||
>>>>>>> develop
|
||||
before_install:
|
||||
- curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > x.sh && source ./x.sh
|
||||
- evm install $EVM_EMACS --use --skip
|
||||
- cask
|
||||
<<<<<<< HEAD
|
||||
env:
|
||||
# - EVM_EMACS=emacs-24.5-travis
|
||||
- EVM_EMACS=emacs-25.1-travis
|
||||
=======
|
||||
>>>>>>> develop
|
||||
script:
|
||||
- emacs --version
|
||||
- make test
|
||||
|
|
11
Makefile
11
Makefile
|
@ -1,5 +1,9 @@
|
|||
CASK ?= cask
|
||||
EMACS ?= emacs
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
CASK_DIR ?= `${CASK} package-directory`
|
||||
>>>>>>> develop
|
||||
|
||||
all: test
|
||||
|
||||
|
@ -15,4 +19,11 @@ unit:
|
|||
install:
|
||||
${CASK} install
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
clean:
|
||||
rm -Rf .emacs.d
|
||||
rm -Rf .cask
|
||||
|
||||
>>>>>>> develop
|
||||
.PHONY: all test unit ecukes install
|
||||
|
|
|
@ -78,7 +78,7 @@ Then you can edit a `plantuml` code block with `plantuml-mode` by hitting `C-'`
|
|||
|
||||
```elisp
|
||||
#+BEGIN_SRC plantuml
|
||||
<hit C-' here to open a plantuml-mode buffer>
|
||||
<hit C-c ' here to open a plantuml-mode buffer>
|
||||
#+END_SRC
|
||||
```
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
;; Maintainer: Carlo Sciolla (skuro)
|
||||
;; Keywords: uml plantuml ascii
|
||||
;; Version: 1.2.3
|
||||
;; Package-Requires: ((emacs "24"))
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -88,8 +87,9 @@
|
|||
(defcustom plantuml-java-command "java"
|
||||
"The java command used to execute PlantUML.")
|
||||
|
||||
(defcustom plantuml-java-args '("-Djava.awt.headless=true" "-jar")
|
||||
"The parameters passed to `plantuml-java-command' when executing PlantUML.")
|
||||
(eval-and-compile
|
||||
(defcustom plantuml-java-args '("-Djava.awt.headless=true" "-jar")
|
||||
"The parameters passed to `plantuml-java-command' when executing PlantUML."))
|
||||
|
||||
(defcustom plantuml-suppress-deprecation-warning t
|
||||
"To silence the deprecation warning when `puml-mode' is found upon loading.")
|
||||
|
@ -278,16 +278,17 @@ Uses prefix (as PREFIX) to choose where to display it:
|
|||
(interactive "p")
|
||||
(plantuml-preview-string prefix (buffer-string)))
|
||||
|
||||
(defun plantuml-preview-region (prefix)
|
||||
"Preview diagram from the PlantUML sources in the current region.
|
||||
(defun plantuml-preview-region (prefix begin end)
|
||||
"Preview diagram from the PlantUML sources in from BEGIN to END.
|
||||
Uses the current region when called interactively.
|
||||
Uses prefix (as PREFIX) to choose where to display it:
|
||||
- 4 (when prefixing the command with C-u) -> new window
|
||||
- 16 (when prefixing the command with C-u C-u) -> new frame.
|
||||
- else -> new buffer"
|
||||
(interactive "p")
|
||||
(interactive "p\nr")
|
||||
(plantuml-preview-string prefix (concat "@startuml\n"
|
||||
(buffer-substring-no-properties
|
||||
(region-beginning) (region-end))
|
||||
begin end)
|
||||
"\n@enduml")))
|
||||
|
||||
(defun plantuml-preview-current-block (prefix)
|
||||
|
@ -311,7 +312,7 @@ Uses prefix (as PREFIX) to choose where to display it:
|
|||
- else -> new buffer"
|
||||
(interactive "p")
|
||||
(if mark-active
|
||||
(plantuml-preview-region prefix)
|
||||
(plantuml-preview-region prefix (region-beginning) (region-end))
|
||||
(plantuml-preview-buffer prefix)))
|
||||
|
||||
(defun plantuml-init-once ()
|
||||
|
|
|
@ -12,6 +12,27 @@
|
|||
(should (equal (expand-file-name "~/plantuml.jar")
|
||||
plantuml-jar-path)))
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
(ert-deftest can-unload-plantuml ()
|
||||
(unload-feature 'plantuml-mode t)
|
||||
(should (eq nil (boundp 'plantuml-jar-path)))
|
||||
(load-plantuml-mode)
|
||||
(should (not (eq nil (boundp 'plantuml-jar-path)))))
|
||||
|
||||
(ert-deftest debug-install-issues ()
|
||||
(unload-feature 'plantuml-mode t)
|
||||
|
||||
(condition-case nil
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.milkbox.net/packages/"))
|
||||
(package-install "plantuml-mode")
|
||||
(unload-feature 'plantuml-mode t))
|
||||
|
||||
(load-plantuml-mode))
|
||||
|
||||
>>>>>>> develop
|
||||
(provide 'plantuml-mode-test)
|
||||
|
||||
;;; plantuml-mode-test.el ends here
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
|
||||
(ert-deftest preview-unicode-test ()
|
||||
(setq-local plantuml-jar-path plantuml-test-jar-path)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
(setq-local plantuml-output-type "utxt")
|
||||
>>>>>>> develop
|
||||
(assert-preview "unicode.puml" "unicode.txt"))
|
||||
|
||||
(provide 'plantuml-mode-preview-test)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
;; Used to test `plantuml-mode' installations
|
||||
|
||||
(setq user-emacs-directory "./.emacs.d")
|
||||
|
||||
(require 'subr-x)
|
||||
(setq local-repository
|
||||
(concat
|
||||
(string-trim (shell-command-to-string "cask package-directory"))
|
||||
"/../testing"))
|
||||
(custom-set-variables `(package-archive-upload-base ,local-repository))
|
||||
|
||||
(require 'package-x)
|
||||
(defun -package-upload (file)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(let ((pkg-desc (package-buffer-info)))
|
||||
(package-upload-buffer-internal pkg-desc "el"))))
|
||||
(-package-upload "plantuml-mode.el")
|
||||
|
||||
(setq package-archives `(("local" . ,local-repository)))
|
||||
(package-initialize)
|
||||
|
||||
(package-install 'plantuml-mode)
|
||||
(require 'plantuml-mode)
|
||||
|
||||
(message
|
||||
(concat "Successfully installed plantuml-mode v" plantuml-mode-version))
|
|
@ -32,6 +32,13 @@
|
|||
(defun read-test-file (path)
|
||||
(f-read (f-join plantuml-test-resources-path path) 'utf-8))
|
||||
|
||||
<<<<<<< HEAD
|
||||
(require 'plantuml-mode (f-expand "plantuml-mode.el" package-code-path))
|
||||
=======
|
||||
(defun load-plantuml-mode ()
|
||||
(require 'plantuml-mode (f-expand "plantuml-mode.el" package-code-path)))
|
||||
|
||||
(load-plantuml-mode)
|
||||
>>>>>>> develop
|
||||
|
||||
;;; test-helper.el ends here
|
||||
|
|
Loading…
Reference in New Issue