aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2021-12-13 18:03:42 +0530
committerArun Isaac2021-12-13 18:06:11 +0530
commit1e36c8bdc8c22dee68a3aa292c1d318bd8e0b982 (patch)
tree7b039e87bdc3218feb70ecee5476cd96c454d852 /tests
parent1e2c9f9893ee2af5a2aa72f512742d101da8cf6a (diff)
downloadccwl-1e36c8bdc8c22dee68a3aa292c1d318bd8e0b982.tar.gz
ccwl-1e36c8bdc8c22dee68a3aa292c1d318bd8e0b982.tar.lz
ccwl-1e36c8bdc8c22dee68a3aa292c1d318bd8e0b982.zip
ccwl: Support graphviz node ports.
* ccwl/graphviz.scm (<graph-port>): New type. (serialize): Support <graph-port> objects. * tests/graphviz.scm (graph-port): New function. ("serialize ports correctly"): New test case.
Diffstat (limited to 'tests')
-rw-r--r--tests/graphviz.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/graphviz.scm b/tests/graphviz.scm
index bb99edc..b61cc61 100644
--- a/tests/graphviz.scm
+++ b/tests/graphviz.scm
@@ -27,6 +27,9 @@
(define graph-node
(@@ (ccwl graphviz) graph-node))
+(define graph-port
+ (@@ (ccwl graphviz) graph-port))
+
(define html-string
(@@ (ccwl graphviz) html-string))
@@ -58,4 +61,16 @@
`((label . "foo\\lbar")))))
port))))
+(test-equal "serialize ports correctly"
+ "digraph foo {
+ foo:p1 -> bar:p2;
+}
+"
+ (call-with-output-string
+ (lambda (port)
+ (graph->dot
+ (graph 'foo
+ #:edges `((,(graph-port "foo" "p1") . ,(graph-port "bar" "p2"))))
+ port))))
+
(test-end "graphviz")