add indentation tests for component diagrams
This commit is contained in:
parent
1b6562a1a2
commit
c31480fcd1
|
@ -0,0 +1,69 @@
|
|||
;;; 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
|
|
@ -324,41 +324,6 @@ box \"Device with USB connector\"
|
|||
end box
|
||||
" ))
|
||||
|
||||
(ert-deftest plantuml-test-block-indentation/various-keywords ()
|
||||
"Test correct indentation of block keywords."
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
cloud \"mycloud\" {
|
||||
[Cloud]
|
||||
}
|
||||
"
|
||||
"
|
||||
cloud \"mycloud\" {
|
||||
[Cloud]
|
||||
}
|
||||
")
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
folder \"myfolder\" {
|
||||
[Folder]
|
||||
}
|
||||
"
|
||||
"
|
||||
folder \"myfolder\" {
|
||||
[Folder]
|
||||
}
|
||||
")
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
frame \"myframe\" {
|
||||
[Frame]
|
||||
}
|
||||
"
|
||||
"
|
||||
frame \"myframe\" {
|
||||
[Frame]
|
||||
}
|
||||
"))
|
||||
|
||||
(ert-deftest plantuml-test-block-indentation/package-database-nested ()
|
||||
"Test correct indentation of two nested blocks, a package and a database.
|
||||
|
|
Loading…
Reference in New Issue