summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorMartin Duffy <martin.duffy@kitware.com>2023-03-22 17:11:21 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-29 14:41:19 (GMT)
commit19305afd8a2a46925b1a880de68f7be0ad1f3091 (patch)
treecdef4417cd852c2a5dd85886df4ff61d7fd2e653 /Tests
parent6b08358e17f5b85ad04ab512e4b6e39e989cea35 (diff)
downloadCMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.zip
CMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.tar.gz
CMake-19305afd8a2a46925b1a880de68f7be0ad1f3091.tar.bz2
presets: Improve JSON parser and error messages
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/testCTestResourceAllocator.cxx16
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec.cxx115
-rw-r--r--Tests/CMakeLib/testJSONHelpers.cxx203
-rw-r--r--Tests/RunCMake/CMakePresets/Comment-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt8
-rw-r--r--Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/HighVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt6
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt7
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt10
-rw-r--r--Tests/RunCMake/CMakePresets/LowVersion-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt4
-rw-r--r--Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/NoVersion-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt5
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt3
-rw-r--r--Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt3
-rw-r--r--Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx3
90 files changed, 405 insertions, 271 deletions
diff --git a/Tests/CMakeLib/testCTestResourceAllocator.cxx b/Tests/CMakeLib/testCTestResourceAllocator.cxx
index 72e06e5..3a2e524 100644
--- a/Tests/CMakeLib/testCTestResourceAllocator.cxx
+++ b/Tests/CMakeLib/testCTestResourceAllocator.cxx
@@ -5,12 +5,16 @@
#include "cmCTestResourceAllocator.h"
#include "cmCTestResourceSpec.h"
-
-static const cmCTestResourceSpec spec{ { {
- /* clang-format off */
- { "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } } },
- /* clang-format on */
-} } };
+#include "cmJSONState.h"
+
+static const cmCTestResourceSpec spec{
+ { {
+ /* clang-format off */
+ { "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } }, },
+ /* clang-format on */
+ } },
+ cmJSONState()
+};
static bool testInitializeFromResourceSpec()
{
diff --git a/Tests/CMakeLib/testCTestResourceSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx
index b49f8ff..4a0021f 100644
--- a/Tests/CMakeLib/testCTestResourceSpec.cxx
+++ b/Tests/CMakeLib/testCTestResourceSpec.cxx
@@ -3,89 +3,72 @@
#include <vector>
#include "cmCTestResourceSpec.h"
+#include "cmJSONState.h"
struct ExpectedSpec
{
std::string Path;
- cmCTestResourceSpec::ReadFileResult ParseResult;
+ bool ParseResult;
cmCTestResourceSpec Expected;
};
static const std::vector<ExpectedSpec> expectedResourceSpecs = {
{ "spec1.json",
- cmCTestResourceSpec::ReadFileResult::READ_OK,
+ true,
{ { {
- { "gpus",
- {
- { "2", 4 },
- { "e", 1 },
- } },
- { "threads", {} },
- } } } },
- { "spec2.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec3.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec4.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec5.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec6.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_SOCKET_SPEC,
- {} },
- { "spec7.json",
- cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE_TYPE,
- {} },
- { "spec8.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec9.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec10.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec11.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec12.json", cmCTestResourceSpec::ReadFileResult::INVALID_ROOT, {} },
- { "spec13.json", cmCTestResourceSpec::ReadFileResult::JSON_PARSE_ERROR, {} },
- { "spec14.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec15.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec16.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec17.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec18.json", cmCTestResourceSpec::ReadFileResult::INVALID_RESOURCE, {} },
- { "spec19.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec20.json", cmCTestResourceSpec::ReadFileResult::READ_OK, {} },
- { "spec21.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec22.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec23.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec24.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec25.json",
- cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
- {} },
- { "spec26.json",
- cmCTestResourceSpec::ReadFileResult::UNSUPPORTED_VERSION,
- {} },
- { "spec27.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec28.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec29.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec30.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec31.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec32.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec33.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec34.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec35.json", cmCTestResourceSpec::ReadFileResult::INVALID_VERSION, {} },
- { "spec36.json", cmCTestResourceSpec::ReadFileResult::NO_VERSION, {} },
- { "noexist.json", cmCTestResourceSpec::ReadFileResult::FILE_NOT_FOUND, {} },
+ { "gpus",
+ {
+ { "2", 4 },
+ { "e", 1 },
+ } },
+ { "threads", {} },
+ } },
+ cmJSONState() } },
+ { "spec2.json", true, {} },
+ { "spec3.json", false, {} },
+ { "spec4.json", false, {} },
+ { "spec5.json", false, {} },
+ { "spec6.json", false, {} },
+ { "spec7.json", false, {} },
+ { "spec8.json", false, {} },
+ { "spec9.json", false, {} },
+ { "spec10.json", false, {} },
+ { "spec11.json", false, {} },
+ { "spec12.json", false, {} },
+ { "spec13.json", false, {} },
+ { "spec14.json", true, {} },
+ { "spec15.json", true, {} },
+ { "spec16.json", true, {} },
+ { "spec17.json", false, {} },
+ { "spec18.json", false, {} },
+ { "spec19.json", false, {} },
+ { "spec20.json", true, {} },
+ { "spec21.json", false, {} },
+ { "spec22.json", false, {} },
+ { "spec23.json", false, {} },
+ { "spec24.json", false, {} },
+ { "spec25.json", false, {} },
+ { "spec26.json", false, {} },
+ { "spec27.json", false, {} },
+ { "spec28.json", false, {} },
+ { "spec29.json", false, {} },
+ { "spec30.json", false, {} },
+ { "spec31.json", false, {} },
+ { "spec32.json", false, {} },
+ { "spec33.json", false, {} },
+ { "spec34.json", false, {} },
+ { "spec35.json", false, {} },
+ { "spec36.json", false, {} },
+ { "noexist.json", false, {} },
};
-static bool testSpec(const std::string& path,
- cmCTestResourceSpec::ReadFileResult expectedResult,
+static bool testSpec(const std::string& path, bool expectedResult,
const cmCTestResourceSpec& expected)
{
cmCTestResourceSpec actual;
auto result = actual.ReadFromJSONFile(path);
if (result != expectedResult) {
- std::cout << "ReadFromJSONFile(\"" << path << "\") returned \""
- << cmCTestResourceSpec::ResultToString(result)
- << "\", should be \""
- << cmCTestResourceSpec::ResultToString(expectedResult) << "\""
- << std::endl;
+ std::cout << "ReadFromJSONFile(\"" << path << "\") failed \"" << std::endl;
return false;
}
diff --git a/Tests/CMakeLib/testJSONHelpers.cxx b/Tests/CMakeLib/testJSONHelpers.cxx
index 053c163..50f0386 100644
--- a/Tests/CMakeLib/testJSONHelpers.cxx
+++ b/Tests/CMakeLib/testJSONHelpers.cxx
@@ -10,6 +10,7 @@
#include <cm3p/json/value.h>
#include "cmJSONHelpers.h"
+#include "cmJSONState.h"
#define ASSERT_TRUE(x) \
do { \
@@ -31,59 +32,65 @@ struct InheritedStruct : public ObjectStruct
std::string Field3;
};
-enum class ErrorCode
+namespace ErrorMessages {
+using ErrorGenerator =
+ std::function<void(const Json::Value*, cmJSONState* state)>;
+ErrorGenerator ErrorGeneratorBuilder(std::string errorMessage)
{
- Success,
- InvalidInt,
- InvalidBool,
- InvalidString,
- InvalidSubObject,
- InvalidObject,
- InvalidArray,
- MissingRequired,
+ return [errorMessage](const Json::Value* value, cmJSONState* state) -> void {
+ state->AddErrorAtValue(errorMessage, value);
+ };
+};
+ErrorGenerator InvalidArray = ErrorGeneratorBuilder("Invalid Array");
+ErrorGenerator MissingRequired = ErrorGeneratorBuilder("Missing Required");
+ErrorGenerator InvalidMap = ErrorGeneratorBuilder("Invalid Map");
+ErrorGenerator InvalidObject(JsonErrors::ObjectError /*errorType*/,
+ const Json::Value::Members& extraFields)
+{
+ return [extraFields](const Json::Value* value, cmJSONState* state) -> void {
+ state->AddErrorAtValue("Invalid Object", value);
+ };
+};
};
-using JSONHelperBuilder = cmJSONHelperBuilder<ErrorCode>;
+using JSONHelperBuilder = cmJSONHelperBuilder;
-auto const IntHelper =
- JSONHelperBuilder::Int(ErrorCode::Success, ErrorCode::InvalidInt, 1);
+auto const IntHelper = JSONHelperBuilder::Int(1);
auto const RequiredIntHelper =
- JSONHelperBuilder::Required<int>(ErrorCode::MissingRequired, IntHelper);
-auto const UIntHelper =
- JSONHelperBuilder::UInt(ErrorCode::Success, ErrorCode::InvalidInt, 1);
-auto const BoolHelper =
- JSONHelperBuilder::Bool(ErrorCode::Success, ErrorCode::InvalidBool, false);
-auto const StringHelper = JSONHelperBuilder::String(
- ErrorCode::Success, ErrorCode::InvalidString, "default");
+ JSONHelperBuilder::Required<int>(ErrorMessages::MissingRequired, IntHelper);
+auto const UIntHelper = JSONHelperBuilder::UInt(1);
+auto const BoolHelper = JSONHelperBuilder::Bool(false);
+auto const StringHelper = JSONHelperBuilder::String("default");
auto const RequiredStringHelper = JSONHelperBuilder::Required<std::string>(
- ErrorCode::MissingRequired, StringHelper);
+ ErrorMessages::MissingRequired, StringHelper);
auto const StringVectorHelper = JSONHelperBuilder::Vector<std::string>(
- ErrorCode::Success, ErrorCode::InvalidArray, StringHelper);
+ ErrorMessages::InvalidArray, StringHelper);
auto const StringVectorFilterHelper =
JSONHelperBuilder::VectorFilter<std::string>(
- ErrorCode::Success, ErrorCode::InvalidArray, StringHelper,
+ ErrorMessages::InvalidArray, StringHelper,
[](const std::string& value) { return value != "ignore"; });
-auto const StringMapHelper = JSONHelperBuilder::Map<std::string>(
- ErrorCode::Success, ErrorCode::InvalidObject, StringHelper);
+auto const StringMapHelper =
+ JSONHelperBuilder::Map<std::string>(ErrorMessages::InvalidMap, StringHelper);
auto const StringMapFilterHelper = JSONHelperBuilder::MapFilter<std::string>(
- ErrorCode::Success, ErrorCode::InvalidObject, StringHelper,
+ ErrorMessages::InvalidMap, StringHelper,
[](const std::string& key) { return key != "ignore"; });
auto const OptionalStringHelper =
- JSONHelperBuilder::Optional<std::string>(ErrorCode::Success, StringHelper);
+ JSONHelperBuilder::Optional<std::string>(StringHelper);
bool testInt()
{
Json::Value v(2);
+ cmJSONState state;
int i = 0;
- ASSERT_TRUE(IntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(IntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
i = 0;
v = Json::nullValue;
- ASSERT_TRUE(IntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!IntHelper(i, &v, &state));
i = 0;
- ASSERT_TRUE(IntHelper(i, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(IntHelper(i, nullptr, &state));
ASSERT_TRUE(i == 1);
return true;
@@ -92,16 +99,16 @@ bool testInt()
bool testUInt()
{
Json::Value v(2);
+ cmJSONState state;
unsigned int i = 0;
- ASSERT_TRUE(UIntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(UIntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
-
i = 0;
v = Json::nullValue;
- ASSERT_TRUE(UIntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!UIntHelper(i, &v, &state));
i = 0;
- ASSERT_TRUE(UIntHelper(i, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(UIntHelper(i, nullptr, &state));
ASSERT_TRUE(i == 1);
return true;
@@ -110,21 +117,22 @@ bool testUInt()
bool testBool()
{
Json::Value v(true);
+ cmJSONState state;
bool b = false;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, &v, &state));
ASSERT_TRUE(b);
b = false;
v = false;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, &v, &state));
ASSERT_TRUE(!b);
b = false;
v = 4;
- ASSERT_TRUE(BoolHelper(b, &v) == ErrorCode::InvalidBool);
+ ASSERT_TRUE(!BoolHelper(b, &v, &state));
b = true;
- ASSERT_TRUE(BoolHelper(b, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(BoolHelper(b, nullptr, &state));
ASSERT_TRUE(!b);
return true;
@@ -133,16 +141,17 @@ bool testBool()
bool testString()
{
Json::Value v("str");
+ cmJSONState state;
std::string str = "";
- ASSERT_TRUE(StringHelper(str, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringHelper(str, &v, &state));
ASSERT_TRUE(str == "str");
str = "";
v = Json::nullValue;
- ASSERT_TRUE(StringHelper(str, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringHelper(str, &v, &state));
str = "";
- ASSERT_TRUE(StringHelper(str, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringHelper(str, nullptr, &state));
ASSERT_TRUE(str == "default");
return true;
@@ -150,17 +159,15 @@ bool testString()
bool testObject()
{
- auto const subhelper =
- JSONHelperBuilder::Object<ObjectStruct>(ErrorCode::Success,
- ErrorCode::InvalidSubObject)
- .Bind("subfield"_s, &ObjectStruct::Field2, IntHelper);
- auto const helper = JSONHelperBuilder::Object<ObjectStruct>(
- ErrorCode::Success, ErrorCode::InvalidObject)
+ auto const subhelper = JSONHelperBuilder::Object<ObjectStruct>().Bind(
+ "subfield"_s, &ObjectStruct::Field2, IntHelper);
+ auto const helper = JSONHelperBuilder::Object<ObjectStruct>()
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper)
.Bind("field2"_s, subhelper)
.Bind<std::string>("field3"_s, nullptr, StringHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = Json::objectValue;
v["field2"]["subfield"] = 2;
@@ -168,38 +175,38 @@ bool testObject()
v["extra"] = "extra";
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v["field2"]["subfield"] = "wrong";
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!helper(s2, &v, &state));
v["field2"].removeMember("subfield");
ObjectStruct s3;
- ASSERT_TRUE(helper(s3, &v) == ErrorCode::InvalidSubObject);
+ ASSERT_TRUE(!helper(s3, &v, &state));
v.removeMember("field2");
ObjectStruct s4;
- ASSERT_TRUE(helper(s4, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s4, &v, &state));
v["field2"] = Json::objectValue;
v["field2"]["subfield"] = 2;
v["field3"] = 3;
ObjectStruct s5;
- ASSERT_TRUE(helper(s5, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!helper(s5, &v, &state));
v.removeMember("field3");
ObjectStruct s6;
- ASSERT_TRUE(helper(s6, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s6, &v, &state));
v = "Hello";
ObjectStruct s7;
- ASSERT_TRUE(helper(s7, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s7, &v, &state));
ObjectStruct s8;
- ASSERT_TRUE(helper(s8, nullptr) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s8, nullptr, &state));
return true;
}
@@ -207,47 +214,48 @@ bool testObject()
bool testObjectInherited()
{
auto const helper =
- JSONHelperBuilder::Object<InheritedStruct>(ErrorCode::Success,
- ErrorCode::InvalidObject)
+ JSONHelperBuilder::Object<InheritedStruct>(ErrorMessages::InvalidObject,
+ true)
.Bind("field1"_s, &InheritedStruct::Field1, StringHelper)
.Bind("field2"_s, &InheritedStruct::Field2, IntHelper)
.Bind("field3"_s, &InheritedStruct::Field3, StringHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
v["field3"] = "world!";
v["extra"] = "extra";
InheritedStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
ASSERT_TRUE(s1.Field3 == "world!");
v["field2"] = "wrong";
InheritedStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!helper(s2, &v, &state));
v.removeMember("field2");
InheritedStruct s3;
- ASSERT_TRUE(helper(s3, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s3, &v, &state));
v["field2"] = 2;
v["field3"] = 3;
InheritedStruct s4;
- ASSERT_TRUE(helper(s4, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!helper(s4, &v, &state));
v.removeMember("field3");
InheritedStruct s5;
- ASSERT_TRUE(helper(s5, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s5, &v, &state));
v = "Hello";
InheritedStruct s6;
- ASSERT_TRUE(helper(s6, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s6, &v, &state));
InheritedStruct s7;
- ASSERT_TRUE(helper(s7, nullptr) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s7, nullptr, &state));
return true;
}
@@ -255,22 +263,23 @@ bool testObjectInherited()
bool testObjectNoExtra()
{
auto const helper = JSONHelperBuilder::Object<ObjectStruct>(
- ErrorCode::Success, ErrorCode::InvalidObject, false)
+ ErrorMessages::InvalidObject, false)
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper)
.Bind("field2"_s, &ObjectStruct::Field2, IntHelper);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v["extra"] = "world!";
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!helper(s2, &v, &state));
return true;
}
@@ -278,31 +287,31 @@ bool testObjectNoExtra()
bool testObjectOptional()
{
auto const helper =
- JSONHelperBuilder::Object<ObjectStruct>(ErrorCode::Success,
- ErrorCode::InvalidObject)
+ JSONHelperBuilder::Object<ObjectStruct>(ErrorMessages::InvalidObject, true)
.Bind("field1"_s, &ObjectStruct::Field1, StringHelper, false)
.Bind("field2"_s, &ObjectStruct::Field2, IntHelper, false)
.Bind<std::string>("field3_s", nullptr, StringHelper, false);
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = 2;
v["field3"] = "world!";
v["extra"] = "extra";
ObjectStruct s1;
- ASSERT_TRUE(helper(s1, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s1, &v, &state));
ASSERT_TRUE(s1.Field1 == "Hello");
ASSERT_TRUE(s1.Field2 == 2);
v = Json::objectValue;
ObjectStruct s2;
- ASSERT_TRUE(helper(s2, &v) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s2, &v, &state));
ASSERT_TRUE(s2.Field1 == "default");
ASSERT_TRUE(s2.Field2 == 1);
ObjectStruct s3;
- ASSERT_TRUE(helper(s3, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(helper(s3, nullptr, &state));
ASSERT_TRUE(s3.Field1 == "default");
ASSERT_TRUE(s3.Field2 == 1);
@@ -312,25 +321,26 @@ bool testObjectOptional()
bool testVector()
{
Json::Value v(Json::arrayValue);
+ cmJSONState state;
v.append("Hello");
v.append("world!");
v.append("ignore");
std::vector<std::string> l{ "default" };
std::vector<std::string> expected{ "Hello", "world!", "ignore" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorHelper(l, &v, &state));
ASSERT_TRUE(l == expected);
v[1] = 2;
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringVectorHelper(l, &v, &state));
v = "Hello";
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, &v) == ErrorCode::InvalidArray);
+ ASSERT_TRUE(!StringVectorHelper(l, &v, &state));
l = { "default" };
- ASSERT_TRUE(StringVectorHelper(l, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorHelper(l, nullptr, &state));
ASSERT_TRUE(l.empty());
return true;
@@ -339,6 +349,7 @@ bool testVector()
bool testVectorFilter()
{
Json::Value v(Json::arrayValue);
+ cmJSONState state;
v.append("Hello");
v.append("world!");
v.append("ignore");
@@ -348,19 +359,19 @@ bool testVectorFilter()
"Hello",
"world!",
};
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorFilterHelper(l, &v, &state));
ASSERT_TRUE(l == expected);
v[1] = 2;
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::InvalidString);
+ ASSERT_TRUE(!StringVectorFilterHelper(l, &v, &state));
v = "Hello";
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, &v) == ErrorCode::InvalidArray);
+ ASSERT_TRUE(!StringVectorFilterHelper(l, &v, &state));
l = { "default" };
- ASSERT_TRUE(StringVectorFilterHelper(l, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringVectorFilterHelper(l, nullptr, &state));
ASSERT_TRUE(l.empty());
return true;
@@ -372,20 +383,21 @@ bool testMap()
v["field1"] = "Hello";
v["field2"] = "world!";
v["ignore"] = "ignore";
+ cmJSONState state;
std::map<std::string, std::string> m{ { "key", "default" } };
std::map<std::string, std::string> expected{ { "field1", "Hello" },
{ "field2", "world!" },
{ "ignore", "ignore" } };
- ASSERT_TRUE(StringMapHelper(m, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapHelper(m, &v, &state));
ASSERT_TRUE(m == expected);
v = Json::arrayValue;
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapHelper(m, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!StringMapHelper(m, &v, &state));
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapHelper(m, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapHelper(m, nullptr, &state));
ASSERT_TRUE(m.empty());
return true;
@@ -394,6 +406,7 @@ bool testMap()
bool testMapFilter()
{
Json::Value v(Json::objectValue);
+ cmJSONState state;
v["field1"] = "Hello";
v["field2"] = "world!";
v["ignore"] = "ignore";
@@ -401,15 +414,15 @@ bool testMapFilter()
std::map<std::string, std::string> m{ { "key", "default" } };
std::map<std::string, std::string> expected{ { "field1", "Hello" },
{ "field2", "world!" } };
- ASSERT_TRUE(StringMapFilterHelper(m, &v) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapFilterHelper(m, &v, &state));
ASSERT_TRUE(m == expected);
v = Json::arrayValue;
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapFilterHelper(m, &v) == ErrorCode::InvalidObject);
+ ASSERT_TRUE(!StringMapFilterHelper(m, &v, &state));
m = { { "key", "default" } };
- ASSERT_TRUE(StringMapFilterHelper(m, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(StringMapFilterHelper(m, nullptr, &state));
ASSERT_TRUE(m.empty());
return true;
@@ -418,13 +431,14 @@ bool testMapFilter()
bool testOptional()
{
Json::Value v = "Hello";
+ cmJSONState state;
cm::optional<std::string> str{ "default" };
- ASSERT_TRUE(OptionalStringHelper(str, &v) == ErrorCode::Success);
+ ASSERT_TRUE(OptionalStringHelper(str, &v, &state));
ASSERT_TRUE(str == "Hello");
str.emplace("default");
- ASSERT_TRUE(OptionalStringHelper(str, nullptr) == ErrorCode::Success);
+ ASSERT_TRUE(OptionalStringHelper(str, nullptr, &state));
ASSERT_TRUE(str == cm::nullopt);
return true;
@@ -433,25 +447,24 @@ bool testOptional()
bool testRequired()
{
Json::Value v = "Hello";
-
std::string str = "default";
int i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, &v) == ErrorCode::Success);
+ cmJSONState state;
+ ASSERT_TRUE(RequiredStringHelper(str, &v, &state));
ASSERT_TRUE(str == "Hello");
- ASSERT_TRUE(RequiredIntHelper(i, &v) == ErrorCode::InvalidInt);
+ ASSERT_TRUE(!RequiredIntHelper(i, &v, &state));
v = 2;
str = "default";
i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, &v) == ErrorCode::InvalidString);
- ASSERT_TRUE(RequiredIntHelper(i, &v) == ErrorCode::Success);
+ ASSERT_TRUE(!RequiredStringHelper(str, &v, &state));
+ ASSERT_TRUE(RequiredIntHelper(i, &v, &state));
ASSERT_TRUE(i == 2);
str = "default";
i = 1;
- ASSERT_TRUE(RequiredStringHelper(str, nullptr) ==
- ErrorCode::MissingRequired);
- ASSERT_TRUE(RequiredIntHelper(i, nullptr) == ErrorCode::MissingRequired);
+ ASSERT_TRUE(!RequiredStringHelper(str, nullptr, &state));
+ ASSERT_TRUE(!RequiredIntHelper(i, nullptr, &state));
return true;
}
diff --git a/Tests/RunCMake/CMakePresets/Comment-stderr.txt b/Tests/RunCMake/CMakePresets/Comment-stderr.txt
index b3b6b66..8619cf5 100644
--- a/Tests/RunCMake/CMakePresets/Comment-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/Comment-stderr.txt
@@ -1,7 +1,6 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/Comment: JSON parse error
-Errors:
-[^
+]*/Tests/RunCMake/CMakePresets/Comment:
+JSON Parse Error: [^
]*Comment\/CMakePresets.json:
\* Line 1, Column 1
Syntax error: value, object or array expected\.
diff --git a/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
index ea5f47f..31ebbc1 100644
--- a/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ConditionFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresets/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
index 895afcb..2d5b477 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance0-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance0: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance0:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
index 1e59e92..596fcf8 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance1-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance1: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance1:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
index 56e630b..a6b83c8 100644
--- a/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/CyclicInheritance2-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/CyclicInheritance2: Cyclic preset inheritance$
+]*/Tests/RunCMake/CMakePresets/CyclicInheritance2:
+Cyclic preset inheritance for preset "CyclicInheritance0"$
diff --git a/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
index c9361ae..ebb9a2d 100644
--- a/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/DuplicatePresets-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/DuplicatePresets: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/DuplicatePresets:
+Duplicate preset: "DuplicatePresets"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
index 749d306..cb9e545 100644
--- a/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyCacheKey-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyCacheKey: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/EmptyCacheKey:
+Invalid preset: "EmptyCacheKey"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
index 723ac21..7774fee 100644
--- a/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnv-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyEnv: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EmptyEnv:
+Invalid macro expansion in "EmptyEnv"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
index 365f537..bc0f866 100644
--- a/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyEnvKey-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyEnvKey: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/EmptyEnvKey:
+Invalid preset: "EmptyEnvKey"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
index 880cee6..b3bfe21 100644
--- a/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyPenv-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyPenv: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EmptyPenv:
+Invalid macro expansion in "EmptyPenv"$
diff --git a/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
index 0d3c500..6f84690 100644
--- a/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EmptyPresetName-stderr.txt
@@ -1,5 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EmptyPresetName: Invalid preset
-Errors:
-[^
-]*/EmptyPresetName/CMakePresets.json$
+]*/Tests/RunCMake/CMakePresets/EmptyPresetName:
+Error: @5,15: Invalid Preset Name
+ "name": "",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
index 1d22b87..8e19c69 100644
--- a/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/EnvCycle-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/EnvCycle: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/EnvCycle:
+Invalid preset: "EnvCycle"
+Invalid macro expansion in "EnvCycle"$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
index 3221345..5c02d5b 100644
--- a/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDeprecated:
+Invalid preset: "ErrorNoWarningDeprecated"$
diff --git a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
index d2ddb90..4640b1e 100644
--- a/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ErrorNoWarningDev-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDev: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ErrorNoWarningDev:
+Invalid preset: "ErrorNoWarningDev"$
diff --git a/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
index 559e3c2..2e94831 100644
--- a/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraPresetField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraPresetField: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/ExtraPresetField:
+Error: @8,18: Invalid extra field "invalid" in Preset
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
index bb281be..554cd4a 100644
--- a/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraRootField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraRootField: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/ExtraRootField:
+Error: @10,14: Invalid extra field "invalid" in root object
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
index 9b346e7..5cb777c 100644
--- a/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/ExtraVariableField-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/ExtraVariableField: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/ExtraVariableField:
+Error: @11,22: Invalid extra field "invalid" in variable "EXTRA" for preset "ExtraVariableField"
+ "invalid": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt b/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
index ba85f0f..b49df79 100644
--- a/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FileDirFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FileDirFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/FileDirFuture:
+Invalid macro expansion in "FileDirFuture"$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
index 36123bd..ca481c6 100644
--- a/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField: File version must be 3 or higher for installDir preset support.$
+]*/Tests/RunCMake/CMakePresets/FuturePresetInstallDirField:
+File version must be 3 or higher for installDir preset support$
diff --git a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
index 9382423..7aedc6d 100644
--- a/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/FuturePresetToolchainField-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/FuturePresetToolchainField: File version must be 3 or higher for toolchainFile preset support.$
+]*/Tests/RunCMake/CMakePresets/FuturePresetToolchainField:
+File version must be 3 or higher for toolchainFile preset support$
diff --git a/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
index d8622f2..598478f 100644
--- a/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/HighVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/HighVersion: Unrecognized "version" field$
+]*/Tests/RunCMake/CMakePresets/HighVersion:
+Error: @2,14: Unrecognized "version" field
+ "version": 1000,
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
index 7f4bb9a..a1dae4c 100644
--- a/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/HostSystemNameFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/HostSystemNameFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/HostSystemNameFuture:
+Invalid macro expansion in "HostSystemNameFuture"$
diff --git a/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
index 3343204..fc6292d 100644
--- a/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeCycle-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeCycle: Cyclic include among preset files$
+]*/Tests/RunCMake/CMakePresets/IncludeCycle:
+Cyclic include among preset files: [^
+]*/CMakeUserPresets.json$
diff --git a/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
index 35aea4c..1bc402a 100644
--- a/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeCycle3Files-stderr.txt
@@ -1,2 +1,4 @@
-^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeCycle3Files: Cyclic include among preset files$
+CMake Error: Could not read presets from [^
+]*/Tests/RunCMake/CMakePresets/IncludeCycle3Files:
+Cyclic include among preset files: [^
+]*/CMakePresets.json
diff --git a/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
index 85a2d78..fba5b01 100644
--- a/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeNotFound-stderr.txt
@@ -1,5 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeNotFound: File not found
-Errors:
-[^
-]*/IncludeNotFound/NotFound.json: Failed to read file$
+]*/Tests/RunCMake/CMakePresets/IncludeNotFound:
+File not found: [^
+]*/IncludeNotFound/NotFound.json$
diff --git a/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
index 1869b6d..7e975a7 100644
--- a/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeV3-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeV3: File version must be 4 or higher for include support$
+]*/Tests/RunCMake/CMakePresets/IncludeV3:
+File version must be 4 or higher for include support$
diff --git a/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt b/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
index 89e3e3d..f14c583 100644
--- a/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/IncludeV4V3-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/IncludeV4V3: File version must be 4 or higher for include support$
+]*/Tests/RunCMake/CMakePresets/IncludeV4V3:
+File version must be 4 or higher for include support$
diff --git a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
index 4a4d4ce..5df075d 100644
--- a/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidArchitectureStrategy:
+Error: @9,21: Invalid preset
+ "strategy": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
index 97f3876..216f308 100644
--- a/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidInheritance-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidInheritance: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidInheritance:
+Invalid preset: "InvalidInheritance"$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
index 2fe8c66..deb35b4 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetBinaryDir:
+Error: @7,20: "binaryDir" expected a string
+ "binaryDir": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
index 9572875..7f19412 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetGenerator-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetGenerator: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetGenerator:
+Error: @6,20: "generator" expected a string
+ "generator": \[\],
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
index 8f6ff7c..4cceb73 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetName-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetName: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetName:
+Error: @5,15: Invalid Preset Name
+ "name": \[\],
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
index 89a424a..f92c48e 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresetVendor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresetVendor: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidPresetVendor:
+Error: @8,17: Invalid preset
+ "vendor": true
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
index 2b0f560..d7081af 100644
--- a/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidPresets-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidPresets: Invalid "configurePresets" field$
+]*/Tests/RunCMake/CMakePresets/InvalidPresets:
+Error: @3,23: Invalid "configurePresets" field
+ "configurePresets": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
index 5b500e4..86cd861 100644
--- a/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidRegex-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidRegex: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/InvalidRegex:
+Invalid preset: "InvalidRegex"
+Invalid macro expansion in "InvalidRegex"$
diff --git a/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
index e5c434d..5f2dcc1 100644
--- a/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidRoot-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidRoot: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/InvalidRoot:
+Error: \@1\,1\: Invalid root object
+\[\]
+\^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
index fab3766..d0974ac 100644
--- a/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidToolsetStrategy:
+Error: @9,21: Invalid preset
+ "strategy": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
index 0ab07c3..fdb7072 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVariableValue-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVariableValue: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/InvalidVariableValue:
+Error: @10,20: "value" expected a string
+ "value": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
index 6d9102a..f329d97 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVariables-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVariables: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/InvalidVariables:
+Error: @8,25: Invalid preset
+ "cacheVariables": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
index af923f0..fc6534e 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVendor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVendor: Invalid root object$
+]*/Tests/RunCMake/CMakePresets/InvalidVendor:
+Error: @3,13: Invalid root object
+ "vendor": true,
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
index 7e0fcfd..97fe9d6 100644
--- a/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/InvalidVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/InvalidVersion: Invalid "version" field$
+]*/Tests/RunCMake/CMakePresets/InvalidVersion:
+Error: @2,14: Invalid "version" field
+ "version": "1.0",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
index 89eff9f..92a1b2b 100644
--- a/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/JSONParseError-stderr.txt
@@ -1,9 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/JSONParseError: JSON parse error
-Errors:
-[^
-]*JSONParseError/CMakePresets.json:
-\* Line 1, Column 1
- Syntax error: value, object or array expected\.
-\* Line 1, Column 1
- A valid JSON document must be either an array or an object value\.$
+]*/Tests/RunCMake/CMakePresets/JSONParseError:
+A JSON document cannot be empty
diff --git a/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
index 92b3723..e933100 100644
--- a/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/LowVersion-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/LowVersion: Unrecognized "version" field$
+]*/Tests/RunCMake/CMakePresets/LowVersion:
+Error: @2,14: Unrecognized "version" field
+ "version": 0,
+ \^
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
index 6548caf..30ab9ce 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid: Invalid "cmakeMinimumRequired" field$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredInvalid:
+Error: @3,27: Invalid "cmakeMinimumRequired"
+ "cmakeMinimumRequired": "3.18",
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
index 6036fe3..c9001ea 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMajor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredMajor: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMajor:
+Error: @4,14: "cmakeMinimumRequired" major version 1000 must be less than [0-9]*
+ "major": 1000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
index bdee4cd..3911c84 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredMinor-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredMinor: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredMinor:
+Error: @5,14: "cmakeMinimumRequired" minor version 1000 must be less than [0-9]*
+ "minor": 1000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
index b5d3a39..e989fa8 100644
--- a/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/MinimumRequiredPatch-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/MinimumRequiredPatch: "cmakeMinimumRequired" version too new$
+]*/Tests/RunCMake/CMakePresets/MinimumRequiredPatch:
+Error: @6,14: "cmakeMinimumRequired" patch version 50000000 must be less than [0-9]*
+ "patch": 50000000
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
index c807ffc..afc5887 100644
--- a/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoCMakePresets-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoCMakePresets: File not found$
+]*/Tests/RunCMake/CMakePresets/NoCMakePresets:
+File not found: [^
+]*/CMakePresets.json$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
index b525fc3..bae9794 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetBinaryDir-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetBinaryDir: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetBinaryDir:
+Preset "NoPresetBinaryDir" missing field "binaryDir"
+Invalid preset: "NoPresetBinaryDir"$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
index 6c0c9f7..c7e5b5e 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetGenerator-stderr.txt
@@ -1,2 +1,4 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetGenerator: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetGenerator:
+Preset "NoPresetGenerator" missing field "generator"
+Invalid preset: "NoPresetGenerator"$
diff --git a/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
index 0ee338a..9aff07f 100644
--- a/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoPresetName-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoPresetName: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/NoPresetName:
+Error: @4,5: Missing required field "name" in Preset
+ {
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
index 7dafe62..8c7ca6e 100644
--- a/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoSuchMacro-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoSuchMacro: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/NoSuchMacro:
+Invalid macro expansion in "NoSuchMacro"$
diff --git a/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
index cdab32f..630c288 100644
--- a/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoVariableValue-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoVariableValue: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/NoVariableValue:
+Error: @9,16: Missing required field "value" in variable "VAR" for preset "NoVariableValue"
+ "VAR": {}
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
index d4f07e4..f7c95db 100644
--- a/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/NoVersion-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/NoVersion: No "version" field$
+]*/Tests/RunCMake/CMakePresets/NoVersion:
+No "version" field$
diff --git a/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt b/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
index b961aaf..7652ddc 100644
--- a/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/PathListSepFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/PathListSepFuture: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/PathListSepFuture:
+Invalid macro expansion in "PathListSepFuture"$
diff --git a/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
index 6604a14..62e9248 100644
--- a/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/PresetNotObject-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/PresetNotObject: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/PresetNotObject:
+Error: @4,5: Invalid Preset
+ \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
index 42b74d6..520b473 100644
--- a/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/SubConditionNull-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/SubConditionNull: Invalid preset condition$
+]*/Tests/RunCMake/CMakePresets/SubConditionNull:
+Invalid condition for preset "SubConditionNull"$
diff --git a/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
index f9481f0..abdbb81 100644
--- a/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnclosedMacro-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnclosedMacro: Invalid macro expansion$
+]*/Tests/RunCMake/CMakePresets/UnclosedMacro:
+Invalid macro expansion in "UnclosedMacro"$
diff --git a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
index cf17881..6063762 100644
--- a/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/UnknownArchitectureStrategy:
+Error: @9,21: Invalid preset
+ "strategy": "unknown"
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
index 8f9be29..55f9c7a 100644
--- a/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy: Invalid preset$
+]*/Tests/RunCMake/CMakePresets/UnknownToolsetStrategy:
+Error: @9,21: Invalid preset
+ "strategy": "unknown"
+ \^$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
index 125265f..8b4139f 100644
--- a/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateCross-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserDuplicateCross: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/UserDuplicateCross:
+Duplicate preset: "UserDuplicateCross"$
diff --git a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
index 1071b17..15c46f4 100644
--- a/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserDuplicateInUser-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserDuplicateInUser: Duplicate presets$
+]*/Tests/RunCMake/CMakePresets/UserDuplicateInUser:
+Duplicate preset: "UserDuplicateInUser"$
diff --git a/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
index 5ad8b4b..2ce1316 100644
--- a/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/UserInheritance-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/UserInheritance: Inherited preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresets/UserInheritance:
+Inherited preset "UserInheritance" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
index 8cacb0a..ce1aa20 100644
--- a/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/VariableNotObject-stderr.txt
@@ -1,2 +1,5 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresets/VariableNotObject: Invalid CMake variable definition$
+]*/Tests/RunCMake/CMakePresets/VariableNotObject:
+Error: @9,16: Invalid CMake variable "VAR" for preset "VariableNotObject"
+ "VAR": \[\]
+ \^$
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
index f08f4c1..aea1dce 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ConditionFuture-build-conditionFuture-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresetsBuild/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
index 05695d9..13b4158 100644
--- a/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable-build-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable: Configure preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsBuild/ConfigurePresetUnreachable:
+Configure preset "x" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
index 303632e..b62fd16 100644
--- a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-build-badConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
index 303632e..b62fd16 100644
--- a/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset-configure-default-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsBuild/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
index fcb37bc..9ce6ea5 100644
--- a/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset-build-noConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset: Invalid preset
+]*/Tests/RunCMake/CMakePresetsBuild/NoConfigurePreset:
+Invalid preset: "noConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt b/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
index d6ae62d..48a5bd3 100644
--- a/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported-build-x-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported: File version must be 2 or higher for build and test preset support.
+]*Tests/RunCMake/CMakePresetsBuild/PresetsUnsupported:
+File version must be 2 or higher for build and test preset support$
diff --git a/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt b/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
index 4c461e3..38ec6bf 100644
--- a/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion-configure-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion: File version must be 6 or higher for package preset support$
+]*/Tests/RunCMake/CMakePresetsPackage/UnsupportedVersion:
+File version must be 6 or higher for package preset support$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
index b814bbb..3f1a506 100644
--- a/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConditionFuture-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/ConditionFuture: File version must be 3 or higher for condition support$
+]*/Tests/RunCMake/CMakePresetsTest/ConditionFuture:
+File version must be 3 or higher for condition support$
diff --git a/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
index d49148d..0be98ef 100644
--- a/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable: Configure preset is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsTest/ConfigurePresetUnreachable:
+Configure preset "x" is unreachable from preset's file
diff --git a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
index 3d7cdd0..c427e42 100644
--- a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-configure-default-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
index 3d7cdd0..c427e42 100644
--- a/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset-test-badConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset: Invalid "configurePreset" field
+]*/Tests/RunCMake/CMakePresetsTest/InvalidConfigurePreset:
+Invalid "configurePreset": "badConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt b/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
index b167f68..a70497f 100644
--- a/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset-test-noConfigurePreset-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset: Invalid preset
+]*/Tests/RunCMake/CMakePresetsTest/NoConfigurePreset:
+Invalid preset: "noConfigurePreset"$
diff --git a/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
index acd5785..da94c3a 100644
--- a/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported: File version must be 6 or higher for CTest JUnit output support$
+]*/Tests/RunCMake/CMakePresetsTest/OutputJUnitUnsupported:
+File version must be 6 or higher for CTest JUnit output support$
diff --git a/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
index eb0ec1a..74c0740 100644
--- a/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/PresetsUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
CMake Error: Could not read presets from [^
-]*Tests/RunCMake/CMakePresetsTest/PresetsUnsupported: File version must be 2 or higher for build and test preset support.
+]*Tests/RunCMake/CMakePresetsTest/PresetsUnsupported:
+File version must be 2 or higher for build and test preset support
diff --git a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
index 90ea7c3..4deb755 100644
--- a/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported-test-x-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported: File version must be 5 or higher for testOutputTruncation preset support\.$
+]*/Tests/RunCMake/CMakePresetsTest/TestOutputTruncationUnsupported:
+File version must be 5 or higher for testOutputTruncation preset support$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
index 22ca94d..33fe914 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/ConfigureStepMismatch:
+Invalid workflow step "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
index cbfee5a..776257b 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/FirstStepNotConfigure:
+First workflow step "default" must be a configure step$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
index 049ed6b..f34a605 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/NoWorkflowSteps:
+No workflow steps specified for "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
index c522b84..a9029e1 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/NonexistentStep:
+Invalid workflow step "default"$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
index b0ad7d5..35eac16 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure: Invalid workflow steps$
+]*/Tests/RunCMake/CMakePresetsWorkflow/SecondStepConfigure:
+Configure workflow step "default" must be the first step
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
index 425e719..f0a36f8 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep: Workflow step is unreachable from preset's file$
+]*/Tests/RunCMake/CMakePresetsWorkflow/UnreachableStep:
+Workflow step "default" is unreachable from preset's file$
diff --git a/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt b/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
index 5cf01aa..93e31eb 100644
--- a/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
+++ b/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion-stderr.txt
@@ -1,2 +1,3 @@
^CMake Error: Could not read presets from [^
-]*/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion: File version must be 6 or higher for workflow preset support$
+]*/Tests/RunCMake/CMakePresetsWorkflow/UnsupportedVersion:
+File version must be 6 or higher for workflow preset support$
diff --git a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
index 5c6c8d8..65f17b6 100644
--- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
+++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx
@@ -286,8 +286,7 @@ static int doVerify(int argc, char const* const* argv)
std::set<std::string> testNameSet(testNameList.begin(), testNameList.end());
cmCTestResourceSpec spec;
- if (spec.ReadFromJSONFile(resFile) !=
- cmCTestResourceSpec::ReadFileResult::READ_OK) {
+ if (spec.ReadFromJSONFile(resFile) != true) {
std::cout << "Could not read resource spec " << resFile << std::endl;
return 1;
}