summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-11-23 15:55:03 (GMT)
committerMarius Kintel <marius@kintel.net>2011-11-23 15:55:03 (GMT)
commite0b5f3f33d974b60daf88a28ce86dc6013f44746 (patch)
treef8b5d3834822cf7234cfdd3b24f1d455cb0e5118
parent60d7e80c482f78e5a8689ad1108d398aaad42f55 (diff)
Output relative filenames in warnings for echotest to give similar results across machines
-rw-r--r--src/dxfdata.cc7
-rw-r--r--tests/regression/echotest/dim-all-expected.txt16
2 files changed, 13 insertions, 10 deletions
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index bf689f7..cf9248f 100644
--- a/src/dxfdata.cc
+++ b/src/dxfdata.cc
@@ -39,6 +39,9 @@
#include <boost/algorithm/string.hpp>
#include <algorithm>
+#include <QDir>
+#include "value.h"
+
struct Line {
int idx[2]; // indices into DxfData::points
bool disabled;
@@ -370,10 +373,10 @@ DxfData::DxfData(double fn, double fs, double fa,
BOOST_FOREACH(const EntityList::value_type &i, unsupported_entities_list) {
if (layername.empty()) {
PRINTF("WARNING: Unsupported DXF Entity `%s' (%x) in `%s'.",
- i.first.c_str(), i.second, filename.c_str());
+ i.first.c_str(), i.second, QuotedString(QDir::current().relativeFilePath(QString::fromStdString(filename)).toStdString()).c_str());
} else {
PRINTF("WARNING: Unsupported DXF Entity `%s' (%x) in layer `%s' of `%s'.",
- i.first.c_str(), i.second, layername.c_str(), filename.c_str());
+ i.first.c_str(), i.second, layername.c_str(), QuotedString(QDir::current().relativeFilePath(QString::fromStdString(filename)).toStdString()).c_str());
}
}
diff --git a/tests/regression/echotest/dim-all-expected.txt b/tests/regression/echotest/dim-all-expected.txt
index 702f026..74044a1 100644
--- a/tests/regression/echotest/dim-all-expected.txt
+++ b/tests/regression/echotest/dim-all-expected.txt
@@ -1,16 +1,16 @@
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: linearX = 51.44957554275265
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: linearY = 29.13025467434841
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: aligned = 60.00000000000001
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: ordinateX = -49.17542445724735
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: ordinateY = 30.86974532565159
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: radius = 60
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: diameter = 120
-WARNING: Unsupported DXF Entity `LEADER' (1) in `/Users/kintel/code/OpenSCAD/openscad/testdata/scad/misc/dim-all.dxf'.
+WARNING: Unsupported DXF Entity `LEADER' (1) in `dim-all.dxf'.
ECHO: arc = 59.03624346792648
contact: Jan Huwald // Impressum