ctest: Remove stray newline in process result string

The plain "Exit code" string had a newline that we do not have in the
other result strings.  This typo was inherited from KWSys Process,
which has been fixed by its upstream.

Fixes: #27119
This commit is contained in:
Brad King
2025-08-07 10:01:33 -04:00
parent 48bb5a4e1c
commit 9c6e53e46f
2 changed files with 2 additions and 2 deletions

View File

@@ -536,7 +536,7 @@ std::string cmProcess::GetExitExceptionString() const
case STATUS_NO_MEMORY:
default:
char buf[1024];
char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64 "\n";
char const* fmt = "Exit code 0x%" KWIML_INT_PRIx64;
snprintf(buf, sizeof(buf), fmt, this->ExitValue);
exception_str.assign(buf);
}

View File

@@ -564,7 +564,7 @@ cmUVProcessChain::Status::GetException() const
case STATUS_NO_MEMORY:
default: {
char buf[256];
snprintf(buf, sizeof(buf), "Exit code 0x%x\n",
snprintf(buf, sizeof(buf), "Exit code 0x%x",
static_cast<unsigned int>(this->ExitStatus));
return std::make_pair(ExceptionCode::Other, buf);
}