From 6901d30830b3274c1b0cc386dda39ba5c355b65b Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 4 Apr 2018 21:55:20 -0700 Subject: [PATCH] Fix test to check for sanitized string from alertnotify. If client version is 1.1.0-rc1, the alertnotify message will have been sanitized and will show as 1.1.0rc1. --- src/gtest/test_deprecation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gtest/test_deprecation.cpp b/src/gtest/test_deprecation.cpp index 1a9ffc6ae..bdb52f05a 100644 --- a/src/gtest/test_deprecation.cpp +++ b/src/gtest/test_deprecation.cpp @@ -7,6 +7,7 @@ #include "init.h" #include "ui_interface.h" #include "util.h" +#include "utilstrencodings.h" #include #include @@ -149,10 +150,10 @@ TEST_F(DeprecationTest, AlertNotify) { EXPECT_EQ(r.size(), 1u); // -alertnotify restricts the message to safe characters. - auto expectedMsg = strprintf( + auto expectedMsg = SanitizeString(strprintf( "This version will be deprecated at block height %d, and will automatically shut down. You should upgrade to the latest version of Zcash. To disable deprecation for this version, set disabledeprecation to %s.", DEPRECATION_HEIGHT, - CLIENT_VERSION_STR); + CLIENT_VERSION_STR)); // Windows built-in echo semantics are different than posixy shells. Quotes and // whitespace are printed literally.