test/test_graph.rb in graph-2.5.2 vs test/test_graph.rb in graph-2.5.3
- old
+ new
@@ -107,10 +107,22 @@
graph.label "blah"
assert_graph graph, 'label = "blah"', '"a" -> "b"'
end
+ def test_label_html
+ graph.label "<<B>blah</B>>"
+
+ assert_graph graph, 'label = <<B>blah</B>>', '"a" -> "b"'
+ end
+
+ def test_label_quote
+ graph.label 'blah"blah'
+
+ assert_graph graph, 'label = "blah\\"blah"', '"a" -> "b"'
+ end
+
def test_label_newline
graph.label "blah\nblah"
assert_graph graph, 'label = "blah\\nblah"', '"a" -> "b"'
end
@@ -365,9 +377,15 @@
def test_label
n.label "blah"
assert_equal ["label = \"blah\""], n.attributes
+ end
+
+ def test_label_html
+ n.label "<<B>Foo</B>>"
+
+ assert_equal ["label = <<B>Foo</B>>"], n.attributes
end
def test_label_newline
n.label "blah\nblah"