aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-05-20 23:39:01 -0500
committerluigi1111 <luigi1111w@gmail.com>2024-05-20 23:39:01 -0500
commitb13e597e8e347b26055047e417963650d9bd7f1f (patch)
tree17ff180801624c8d630c4f9734c22f93479778a1 /tests/unit_tests
parent19fa7dceac6de9a2c8c5f6231284a26a5bc60ed0 (diff)
parent755dddd2bc9a74fe7f2a61fc49af2a98ca4e82ee (diff)
downloadmonzero-core-b13e597e8e347b26055047e417963650d9bd7f1f.tar.gz
monzero-core-b13e597e8e347b26055047e417963650d9bd7f1f.tar.xz
monzero-core-b13e597e8e347b26055047e417963650d9bd7f1f.zip
Merge pull request #9306
755dddd common: support boost filesystem copy_options. Co-authored-by: selsta <selsta@sent.at> (0xFFFC0000)
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/wallet_storage.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/unit_tests/wallet_storage.cpp b/tests/unit_tests/wallet_storage.cpp
index dacaff960..bf33936ed 100644
--- a/tests/unit_tests/wallet_storage.cpp
+++ b/tests/unit_tests/wallet_storage.cpp
@@ -31,6 +31,7 @@
#include "file_io_utils.h"
#include "wallet/wallet2.h"
+#include "common/util.h"
using namespace boost::filesystem;
using namespace epee::file_io_utils;
@@ -47,8 +48,8 @@ TEST(wallet_storage, store_to_file2file)
ASSERT_TRUE(is_file_exist(source_wallet_file.string()));
ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys"));
- copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists);
- copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists);
+ tools::copy_file(source_wallet_file.string(), interm_wallet_file.string());
+ tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys");
ASSERT_TRUE(is_file_exist(interm_wallet_file.string()));
ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys"));
@@ -138,8 +139,8 @@ TEST(wallet_storage, change_password_same_file)
ASSERT_TRUE(is_file_exist(source_wallet_file.string()));
ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys"));
- copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists);
- copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists);
+ tools::copy_file(source_wallet_file.string(), interm_wallet_file.string());
+ tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys");
ASSERT_TRUE(is_file_exist(interm_wallet_file.string()));
ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys"));
@@ -177,8 +178,8 @@ TEST(wallet_storage, change_password_different_file)
ASSERT_TRUE(is_file_exist(source_wallet_file.string()));
ASSERT_TRUE(is_file_exist(source_wallet_file.string() + ".keys"));
- copy_file(source_wallet_file, interm_wallet_file, copy_option::overwrite_if_exists);
- copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys", copy_option::overwrite_if_exists);
+ tools::copy_file(source_wallet_file.string(), interm_wallet_file.string());
+ tools::copy_file(source_wallet_file.string() + ".keys", interm_wallet_file.string() + ".keys");
ASSERT_TRUE(is_file_exist(interm_wallet_file.string()));
ASSERT_TRUE(is_file_exist(interm_wallet_file.string() + ".keys"));