From 2204a983c628442e8ce6366a200823e8bbd5f14e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 12 Mar 2016 08:59:54 -0800 Subject: [PATCH] [test][windows] use utf8 encoding + stop using non-portable path comparison --- test/unit/datasource/csv.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unit/datasource/csv.cpp b/test/unit/datasource/csv.cpp index 20d755674..6142185ca 100644 --- a/test/unit/datasource/csv.cpp +++ b/test/unit/datasource/csv.cpp @@ -189,7 +189,7 @@ TEST_CASE("csv") { int ret_posix = (ret >> 8) & 0x000000ff; INFO(ret); INFO(ret_posix); - if (path != "test/data/csv/more_headers_than_column_values.csv") // mapnik-index won't create *.index for 0 features + if (!boost::iends_with(path,"more_headers_than_column_values.csv")) // mapnik-index won't create *.index for 0 features { CHECK(mapnik::util::exists(path + ".index")); } @@ -878,7 +878,8 @@ TEST_CASE("csv") { REQUIRE(bool(feature)); REQUIRE(feature->has_key("Name")); std::string utf8; - ustring expected_string(name.c_str()); + mapnik::transcoder tr("utf-8"); + ustring expected_string = tr.transcode(name.c_str()); mapnik::value val(expected_string); mapnik::to_utf8(expected_string,utf8); INFO(feature->get("Name"));