plantuml-mode/test/plantuml-indentation-deploy...

112 lines
1.6 KiB
EmacsLisp
Raw Normal View History

Rsch/indentation/multiple start regexs (#88) * fix version * split indentation rexgexs Split the regexs as a preparation for improvement and enhancement. No explicit enhancement was intended, although the `plantuml-indent-regexp-block-start' covers more blocks now. * enhance and test regexs for groups Changed `plantuml-indent-regexp-group-start' to cover all cases mentioned on sequence diagram page of the plantuml website. Added tests for all elements-with and without label (text following the keyword). * add support and test for box/end box blocks * indentation test for a nested interface block * correction of () at end of file * indentation test for deployment diagram * file “Cask”: added dependency to dash * indentation tests for diagram commons * add indentation tests for component diagrams * regex corrections and added indentation tests for class diagrams correct indentation regexs found by tests for class diagrams * add indentation tests for object diagrams * add indentation tests for state diagrams * enhance indentation class diagram test: abstract class and interface * move indentation tests to diagram test files * mv test/plantuml-indentation-test.el -> test/plantuml-indentation-basics-test.el * add indentation sequence diagram tests and mv basics tests to diagram tests * add indentation for ref-groups * improved indentation for ref-groups * support indentation for activity diagrams - current/old style * indentation support for notes * rm not used regexs * indentation support for plantuml macros * correction: … → etc.
2019-03-16 10:53:17 +01:00
;;; plantuml-indentation-deployment-test.el --- PlantUML Mode indentation tests -*- lexical-binding: t; -*-
;; Author: René Schmelzer
;; Maintainer: Carlo Sciolla (skuro)
;; URL: https://github.com/skuro/plantuml-mode
;;; Commentary:
;; Test indentation for deployment diagrams.
;; Most plantuml code examples are taken from www.plantuml.com
;;; Code:
(ert-deftest plantuml-test-indentation/deployment-diagram ()
"Test correct indentation of plantuml deployment diagram elements."
(plantuml-test-indent-block
"
artifact Foo1 {
folder Foo2
}
folder Foo3 {
artifact Foo4
}
frame Foo5 {
database Foo6
}
cloud vpc {
node ec2 {
stack stack
}
}
node Foo1 {
cloud Foo2
}
cloud Foo3 {
frame Foo4
}
database Foo5 {
storage Foo6
}
storage Foo7 {
storage Foo8
}
"
"
artifact Foo1 {
folder Foo2
}
folder Foo3 {
artifact Foo4
}
frame Foo5 {
database Foo6
}
cloud vpc {
node ec2 {
stack stack
}
}
node Foo1 {
cloud Foo2
}
cloud Foo3 {
frame Foo4
}
database Foo5 {
storage Foo6
}
storage Foo7 {
storage Foo8
}
"))
(ert-deftest plantuml-test-block-indentation/package-database-nested ()
"Test correct indentation of two nested blocks, a package and a database.
Note: package is used in class and object diagrams as well, see there for more tests."
(plantuml-test-indent-block
"
package APackage {
database ADatabase {
A -> B
}
}
"
"
package APackage {
database ADatabase {
A -> B
}
}
"))
(provide 'plantuml-indentation-deployment-test)
;;; plantuml-indentation-deployment-test.el ends here