Added tests for Information Engineering (IE) notation

This commit is contained in:
Carlo Sciolla 2019-03-16 12:55:56 +01:00
parent ef4eecefae
commit 0e54f437f6
No known key found for this signature in database
GPG Key ID: BA5D71E6F3C580C1
1 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,58 @@
;;; plantuml-indentation-ie-test.el --- PlantUML Mode indentation tests -*- lexical-binding: t; -*-
;; Author: Carlo Sciolla (skuro)
;; Maintainer: Carlo Sciolla (skuro)
;; URL: https://github.com/skuro/plantuml-mode
;;; Commentary:
;; Test indentation of Information Engineering (IE) notation.
;; See https://github.com/plantuml/plantuml/pull/31
;;; Code:
(ert-deftest plantuml-test-block-indentation/ie-entity ()
"Test correct indentation of an entity block."
(plantuml-test-indent-block
"
entity Entity {
* identifying_attribute
--
* mandatory_attribute
optional_attribute
}
"
"
entity Entity {
* identifying_attribute
--
* mandatory_attribute
optional_attribute
}
"
))
(ert-deftest plantuml-test-indendation/ie-arrows ()
"Test correct indentation of IE-style arrows."
(plantuml-test-indent-block
"
foo1 --{ bar1
foo1 --{ bar2
foo1 --{ bar3
aa --o{ bb
aa --o{ cc
aa --o{ dd
"
"
foo1 --{ bar1
foo1 --{ bar2
foo1 --{ bar3
aa --o{ bb
aa --o{ cc
aa --o{ dd
"))
;;; plantuml-indentation-ie-test.el ends here