From 0e54f437f6a7698c756b94900e04f9b0301552b1 Mon Sep 17 00:00:00 2001 From: Carlo Sciolla Date: Sat, 16 Mar 2019 12:55:56 +0100 Subject: [PATCH] Added tests for Information Engineering (IE) notation --- test/plantuml-indentation-ie-test.el | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 test/plantuml-indentation-ie-test.el diff --git a/test/plantuml-indentation-ie-test.el b/test/plantuml-indentation-ie-test.el new file mode 100644 index 0000000..d69f2c9 --- /dev/null +++ b/test/plantuml-indentation-ie-test.el @@ -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