]> granicus.if.org Git - graphviz/commitdiff
Check for empty strings in tp and hp.
authorRob Hart <robhart@google.com>
Wed, 16 Dec 2020 21:50:19 +0000 (13:50 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 13 Jan 2021 15:11:32 +0000 (07:11 -0800)
Edit by Matthew Fernandez: Squashed a fixup commit into this one, adjusted the
(now prior) test case to expect to pass, and added a changelog entry. For
reference, the bug being fixed was introduced in
31bab037c9bfde3bd18e06b5ab878c09de265ccf.

Fixes #1907.

CHANGELOG.md
lib/common/labels.c
rtest/test_regression.py

index 460e84b2f7a4bb851e0de3348ee64ff136a97b1f..eaac8c5bea1edda0581d104059355e68e2323d75 100644 (file)
@@ -73,6 +73,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Add gv2gml tool to CMake (copy of gml2gv on Windows, symlink to gml2gv otherwise)
 - Regression: fdp generates internal names in the output #1876
 - Regression: fdp assertion error on cluster in edge #1877
+- Regression in id / &lt;title&gt; in svg for twopi #1907
 
 ## [2.44.1] - 2020-06-29
 
index 61aca92ed332bd1776dcb74b7d5591af2c2d626f..216bc9b282035e06143323e9ae44ddac8732d5ff 100644 (file)
@@ -322,11 +322,11 @@ static char *strdup_and_subst_obj0 (char *str, void *obj, int escBackslash)
            t_str = agnameof(agtail(((edge_t *)obj)));
            pt = ED_tail_port((edge_t *)obj);
            if ((tp_str = pt.name))
-               has_tp = TRUE;
+               has_tp = (*tp_str != '\0');
            h_str = agnameof(aghead(((edge_t *)obj)));
            pt = ED_head_port((edge_t *)obj);
            if ((hp_str = pt.name))
-               has_hp = TRUE;
+               has_hp = (*hp_str != '\0');
            tl = ED_label((edge_t *)obj);
            if (tl) {
                l_str = tl->text;
index 229ede0a426f04ad42dea4635c019be3c242a34b..3e4e14dccda70ee2fe1b9a262c4bdac790f149df 100644 (file)
@@ -559,7 +559,6 @@ def test_1869(variant: int):
     assert 'style=dashed' in output, 'style=dashed not found in DOT output'
     assert 'penwidth=2' in output, 'penwidth=2 not found in DOT output'
 
-@pytest.mark.xfail(strict=True) # FIXME
 @pytest.mark.skipif(shutil.which('twopi') is None, reason='twopi not available')
 def test_1907():
     '''