File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ simple_str = mktemp() do file, io
35
35
end
36
36
37
37
print (simple_str) # md
38
- @test simple_str == " graph T {\n a \ n b \ n a -- b \n }\n " # src
38
+ @test simple_str == " graph T {\n \" a \"\ n \" b \"\ n \" a \" -- \" b \" \n }\n " # src
39
39
40
40
# -
41
41
60
60
61
61
print (complicated_str) # md
62
62
@test complicated_str == # src
63
- " digraph G {\n tagged = true\n a [code_1 = 1, code_2 = 2]\n b [code = 2]\n a -> b [code = 12]\n }\n " # src
63
+ " digraph G {\n tagged = true\n \" a\" [code_1 = 1, code_2 = 2]\n \" b\" [code = 2]\n \" a\" -> \" b\" [code = 12]\n }\n " # src
64
+
65
+ with_spaces = MetaGraph (
66
+ DiGraph ();
67
+ label_type= String,
68
+ vertex_data_type= Dict{Symbol,String},
69
+ edge_data_type= Dict{Symbol,String},
70
+ )
71
+
72
+ with_spaces[" a b" ] = Dict (:label => " A B" )
73
+
74
+ with_spaces[" c d" ] = Dict (:label => " C D" )
75
+
76
+ with_spaces[" a b" , " c d" ] = Dict (:label => " A B to C D" )
77
+
78
+ with_spaces_str = mktemp () do file, io
79
+ savegraph (file, with_spaces, DOTFormat ())
80
+ read (file, String)
81
+ end
82
+
83
+ print (with_spaces_str)
84
+ @test with_spaces_str ==
85
+ """
86
+ digraph G {
87
+ "a b" [label = "A B"]
88
+ "c d" [label = "C D"]
89
+ "a b" -> "c d" [label = "A B to C D"]
90
+ }
91
+ """
You can’t perform that action at this time.
0 commit comments