diff --git a/src/programs/tests/JParameterManagerTests.cc b/src/programs/tests/JParameterManagerTests.cc index 2ac86693a..b2801470f 100644 --- a/src/programs/tests/JParameterManagerTests.cc +++ b/src/programs/tests/JParameterManagerTests.cc @@ -317,4 +317,14 @@ TEST_CASE("JParameterManager_ArrayParams") { } } +TEST_CASE("JParameterManager_Issue217StringsWithWhitespace") { + JParameterManager jpm; + SECTION("Reading a array of strings") { + jpm.SetParameter("test", "( abs(fmod(tower_1, 24) - fmod(tower_2, 24)) + min( abs((sector_1 - sector_2) * (2 * 5) + (floor(tower_1 / 24) - floor(tower_2 / 24)) * 5 + fmod(tile_1, 5) - fmod(tile_2, 5)), (32 * 2 * 5) - abs((sector_1 - sector_2) * (2 * 5) + (floor(tower_1 / 24) - floor(tower_2 / 24)) * 5 + fmod(tile_1, 5) - fmod(tile_2, 5)) )) == 1"); + std::string vals; + jpm.GetParameter("test", vals); + REQUIRE(vals == "( abs(fmod(tower_1, 24) - fmod(tower_2, 24)) + min( abs((sector_1 - sector_2) * (2 * 5) + (floor(tower_1 / 24) - floor(tower_2 / 24)) * 5 + fmod(tile_1, 5) - fmod(tile_2, 5)), (32 * 2 * 5) - abs((sector_1 - sector_2) * (2 * 5) + (floor(tower_1 / 24) - floor(tower_2 / 24)) * 5 + fmod(tile_1, 5) - fmod(tile_2, 5)) )) == 1"); + } +} +