[mapnik] 01/04: Imported Upstream version 3.0.12~rc3+ds
Bas Couwenberg
sebastic at debian.org
Fri Aug 12 18:38:19 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository mapnik.
commit 8f8d94b54b81e78cc498ff5448e54ab0b563bc62
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Aug 12 19:49:01 2016 +0200
Imported Upstream version 3.0.12~rc3+ds
---
CHANGELOG.md | 1 +
bootstrap.sh | 4 ++++
include/mapnik/json/stringifier.hpp | 2 +-
test/unit/core/expressions_test.cpp | 6 +++---
test/unit/datasource/geojson.cpp | 8 ++++----
test/unit/datasource/topojson.cpp | 9 ++++-----
6 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c3c00b..9840af1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,7 @@ Released: xx-xx-xx
- Added support for quantising small (less than 3 pixel) images (ref #3466)
- Added support for natural logarithm function in expressions (ref #3475)
- Improved logic determining if certain compiler features are available e.g `inheriting constructors` (MSVC)
+- GeoJSON - corrected quoting in `stringgifird` objects (ref #3491)
## 3.0.11
diff --git a/bootstrap.sh b/bootstrap.sh
index b0ebcf8..62eb1ec 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -67,6 +67,10 @@ function install_mason_deps() {
install boost_libfilesystem 1.61.0 &
install boost_libprogram_options 1.61.0 &
install boost_libregex_icu 1.61.0 &
+ # technically boost thread and python are not a core dep, but installing
+ # here by default helps make python-mapnik builds easier
+ install boost_libthread 1.61.0 &
+ install boost_libpython 1.61.0 &
install freetype 2.6 libfreetype &
install harfbuzz 0.9.41 libharfbuzz &
for job in $(jobs -p)
diff --git a/include/mapnik/json/stringifier.hpp b/include/mapnik/json/stringifier.hpp
index 93906f6..44b9425 100644
--- a/include/mapnik/json/stringifier.hpp
+++ b/include/mapnik/json/stringifier.hpp
@@ -86,7 +86,7 @@ struct stringifier
{
if (first) first = false;
else str += ",";
- str += kv.first;
+ str += "\"" + kv.first + "\"";
str += ":";
str += mapnik::util::apply_visitor(*this, kv.second);
}
diff --git a/test/unit/core/expressions_test.cpp b/test/unit/core/expressions_test.cpp
index c10982f..22ba3c0 100644
--- a/test/unit/core/expressions_test.cpp
+++ b/test/unit/core/expressions_test.cpp
@@ -180,14 +180,14 @@ TEST_CASE("expressions")
//'\u265C\u265E\u265D\u265B\u265A\u265D\u265E\u265C' - black chess figures
// replace black knights with white knights
auto val0 = eval(u8"'\u265C\u265E\u265D\u265B\u265A\u265D\u265E\u265C'.replace('\u265E','\u2658')");
- auto val1 = eval(u8"'♜♞♝♛♚♝♞♜'.replace('♞','♘')"); // ==> expected ♜♘♝♛♚♝♘♜
+ auto val1 = eval("'♜♞♝♛♚♝♞♜'.replace('♞','♘')"); // ==> expected ♜♘♝♛♚♝♘♜
TRY_CHECK(val0 == val1);
TRY_CHECK(val0.to_string() == val1.to_string()); // UTF-8
TRY_CHECK(val0.to_unicode() == val1.to_unicode()); // Unicode (UTF-16)
// following test will fail if boost_regex is built without ICU support (unpaired surrogates in output)
- TRY_CHECK(eval("[name].replace('(\\B)|( )',' ') ") == tr.transcode(u8"Q u é b e c"));
- TRY_CHECK(eval("'Москва'.replace('(?<!^)(\\B|b)(?!$)',' ')") == tr.transcode(u8"М о с к в а"));
+ TRY_CHECK(eval("[name].replace('(\\B)|( )',' ') ") == tr.transcode("Q u é b e c"));
+ TRY_CHECK(eval("'Москва'.replace('(?<!^)(\\B|b)(?!$)',' ')") == tr.transcode("М о с к в а"));
// 'foo' =~ s:(\w)\1:$1x:r
TRY_CHECK(eval(" 'foo'.replace('(\\w)\\1', '$1x') ") == tr.transcode("fox"));
TRY_CHECK(parse_and_dump(" 'foo'.replace('(\\w)\\1', '$1x') ") == "'foo'.replace('(\\w)\\1','$1x')");
diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp
index 1edeb4b..60052db 100644
--- a/test/unit/datasource/geojson.cpp
+++ b/test/unit/datasource/geojson.cpp
@@ -701,12 +701,12 @@ TEST_CASE("geojson") {
attr{"description", tr.transcode("Test: \u005C")},
attr{"double", mapnik::value_double(1.1)},
attr{"int", mapnik::value_integer(1)},
- attr{"object", tr.transcode("{name:\"waka\",spaces:\"value with spaces\",int:1,double:1.1,boolean:false"
- ",NOM_FR:\"Québec\",array:[\"string\",\"value with spaces\",3,1.1,null,true"
- ",\"Québec\"],another_object:{name:\"nested object\"}}")},
+ attr{"object", tr.transcode("{\"name\":\"waka\",\"spaces\":\"value with spaces\",\"int\":1,\"double\":1.1,\"boolean\":false"
+ ",\"NOM_FR\":\"Québec\",\"array\":[\"string\",\"value with spaces\",3,1.1,null,true"
+ ",\"Québec\"],\"another_object\":{\"name\":\"nested object\"}}")},
attr{"spaces", tr.transcode("this has spaces")},
attr{"array", tr.transcode("[\"string\",\"value with spaces\",3,1.1,null,true,"
- "\"Québec\",{name:\"object within an array\"},"
+ "\"Québec\",{\"name\":\"object within an array\"},"
"[\"array\",\"within\",\"an\",\"array\"]]")},
attr{"empty_array", tr.transcode("[]")},
attr{"empty_object", tr.transcode("{}")},
diff --git a/test/unit/datasource/topojson.cpp b/test/unit/datasource/topojson.cpp
index 6b1a2e1..41d9b19 100644
--- a/test/unit/datasource/topojson.cpp
+++ b/test/unit/datasource/topojson.cpp
@@ -48,7 +48,6 @@ bool parse_topology(std::string const& filename, mapnik::topojson::topology & to
return (result && (itr == end));
}
-
}
TEST_CASE("topojson")
@@ -97,12 +96,12 @@ TEST_CASE("topojson")
attr{"description", tr.transcode("Test: \u005C")},
attr{"double", mapnik::value_double(1.1)},
attr{"int", mapnik::value_integer(1)},
- attr{"object", tr.transcode("{name:\"waka\",spaces:\"value with spaces\",int:1,double:1.1,boolean:false"
- ",NOM_FR:\"Québec\",array:[\"string\",\"value with spaces\",3,1.1,null,true"
- ",\"Québec\"],another_object:{name:\"nested object\"}}")},
+ attr{"object", tr.transcode("{\"name\":\"waka\",\"spaces\":\"value with spaces\",\"int\":1,\"double\":1.1,\"boolean\":false"
+ ",\"NOM_FR\":\"Québec\",\"array\":[\"string\",\"value with spaces\",3,1.1,null,true"
+ ",\"Québec\"],\"another_object\":{\"name\":\"nested object\"}}")},
attr{"spaces", tr.transcode("this has spaces")},
attr{"array", tr.transcode("[\"string\",\"value with spaces\",3,1.1,null,true,"
- "\"Québec\",{name:\"object within an array\"},"
+ "\"Québec\",{\"name\":\"object within an array\"},"
"[\"array\",\"within\",\"an\",\"array\"]]")},
attr{"empty_array", tr.transcode("[]")},
attr{"empty_object", tr.transcode("{}")},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapnik.git
More information about the Pkg-grass-devel
mailing list