Skip to content

Commit ce336d9

Browse files
committed
Fix docs
1 parent c0d29fb commit ce336d9

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

src/MetaGraphsNext.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
MetaGraphsNext
33
4-
A package for graphs with vertex labels and metadata in Julia. Its main export is the [`MetaGraph`](@ref) type.
4+
A package for graphs with vertex labels and metadata in Julia. Its main export is the `MetaGraph` type.
55
"""
66
module MetaGraphsNext
77

test/tutorial/3_files.jl

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,16 @@ simple_str = mktemp() do file, io
3434
read(file, String)
3535
end
3636

37-
print(simple_str) #md
38-
@test simple_str == "graph T {\n \"a\"\n \"b\"\n \"a\" -- \"b\"\n}\n" #src
37+
simple_str_true = """
38+
graph T {
39+
"a"
40+
"b"
41+
"a" -- "b"
42+
}
43+
"""
44+
45+
simple_str == simple_str_true
46+
@test simple_str == simple_str_true #src
3947

4048
#-
4149

@@ -58,9 +66,18 @@ complicated_str = mktemp() do file, io
5866
read(file, String)
5967
end
6068

61-
print(complicated_str) #md
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
69+
complicated_str_true = """
70+
digraph G {
71+
tagged = true
72+
"a" [code_1 = 1, code_2 = 2]
73+
"b" [code = 2]
74+
"a" -> "b" [code = 12]
75+
}
76+
"""
77+
78+
@test complicated_str == complicated_str_true
79+
80+
#-
6481

6582
with_spaces = MetaGraph(
6683
DiGraph();
@@ -80,11 +97,13 @@ with_spaces_str = mktemp() do file, io
8097
read(file, String)
8198
end
8299

83-
print(with_spaces_str)
84-
@test with_spaces_str == """
85-
digraph G {
86-
"a b" [label = "A B"]
87-
"c d" [label = "C D"]
88-
"a b" -> "c d" [label = "A B to C D"]
89-
}
90-
"""
100+
with_spaces_str_true = """
101+
digraph G {
102+
"a b" [label = "A B"]
103+
"c d" [label = "C D"]
104+
"a b" -> "c d" [label = "A B to C D"]
105+
}
106+
"""
107+
108+
with_spaces_str == with_spaces_str_true
109+
@test with_spaces_str == with_spaces_str_true #src

0 commit comments

Comments
 (0)