plantuml-mode/test/plantuml-indentation-compon...

70 lines
1.2 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-component-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 component diagrams.
;;; Code:
(ert-deftest plantuml-test-indentation/component-diagram ()
"Test correct indentation of plantuml component diagram elements.
These code examples are taken from www.plantuml.com"
(plantuml-test-indent-block
"
package \"Some Group\" {
HTTP - [First Component]
[Another Component]
}
node \"Other Groups\" {
FTP - [Second Component]
[First Component] --> FTP
}
cloud {
[Example 1]
}
database \"MySql\" {
folder \"This is my folder\" {
[Folder 3]
}
frame \"Foo\" {
[Frame 4]
}
}
"
"
package \"Some Group\" {
HTTP - [First Component]
[Another Component]
}
node \"Other Groups\" {
FTP - [Second Component]
[First Component] --> FTP
}
cloud {
[Example 1]
}
database \"MySql\" {
folder \"This is my folder\" {
[Folder 3]
}
frame \"Foo\" {
[Frame 4]
}
}
"))
(provide 'plantuml-indentation-component-test)
;;; plantuml-indentation-component-test.el ends here