From 762f81172de95c2d54a66f744629d42d93b437dc Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Tue, 17 Jan 2023 20:24:56 -0800 Subject: [PATCH] gv2gxl, gxl2gv: fix mode detection on Windows Gitlab: fixes #2344 --- CHANGELOG.md | 2 ++ cmd/tools/cvtgxl.c | 5 +++++ tests/test_regression.py | 1 - 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ac11c19..a1331e5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The `pic` output renderer uses PIC or troff comments where appropriate, fixing a problem that resulted in comments being misinterpreted by `groff` and being visible in the final output. #2341 +- `gv2gxl` and `gxl2gv` correctly detect their mode (gv→gxl or gxl→gv) on + Windows when called via an absolute or relative path. #2344 ## [7.1.0] – 2023-01-21 diff --git a/cmd/tools/cvtgxl.c b/cmd/tools/cvtgxl.c index 2ce7d3485..22d8617c5 100644 --- a/cmd/tools/cvtgxl.c +++ b/cmd/tools/cvtgxl.c @@ -96,6 +96,11 @@ static char *cmdName(char *path) sp++; else sp = path; +#if _WIN32 + char *sp2 = strrchr(sp, '\\'); + if (sp2 != NULL) + sp = sp2 + 1; +#endif return sp; } diff --git a/tests/test_regression.py b/tests/test_regression.py index dc90f473d..de2009a36 100644 --- a/tests/test_regression.py +++ b/tests/test_regression.py @@ -327,7 +327,6 @@ def test_358(): @pytest.mark.skipif(which("gv2gxl") is None or which("gxl2gv") is None, reason="GXL tools not available") -@pytest.mark.xfail() # FIXME: #2344 def test_517(): """ round tripping a graph through gv2gxl should not lose HTML labels -- 2.40.0