From abf5666a251aaaf8d403b9fa431cacbd948c4181 Mon Sep 17 00:00:00 2001 From: Rob Hart Date: Wed, 16 Dec 2020 13:50:19 -0800 Subject: [PATCH] Check for empty strings in tp and hp. 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 | 1 + lib/common/labels.c | 4 ++-- rtest/test_regression.py | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 460e84b2f..eaac8c5be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 / <title> in svg for twopi #1907 ## [2.44.1] - 2020-06-29 diff --git a/lib/common/labels.c b/lib/common/labels.c index 61aca92ed..216bc9b28 100644 --- a/lib/common/labels.c +++ b/lib/common/labels.c @@ -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; diff --git a/rtest/test_regression.py b/rtest/test_regression.py index 229ede0a4..3e4e14dcc 100644 --- a/rtest/test_regression.py +++ b/rtest/test_regression.py @@ -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(): ''' -- 2.50.0