1
0

fix: export subkey test cases on windows
All checks were successful
Develop CI Qt5 / build (push) Successful in 7m34s
Develop CI Qt6 / build (push) Successful in 11m37s

This commit is contained in:
saturneric 2024-12-02 21:20:09 +01:00
parent 9d03cb44f2
commit d6de218295

View File

@ -40,8 +40,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestA) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
QCryptographicHash::Sha256)
QCryptographicHash::hash(
gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@ -54,8 +55,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestB) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
QCryptographicHash::Sha256)
QCryptographicHash::hash(
gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@ -68,8 +70,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestC) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
QCryptographicHash::Sha256)
QCryptographicHash::hash(
gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@ -82,8 +85,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestD) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
QCryptographicHash::Sha256)
QCryptographicHash::hash(
gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));