mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Remove DirIsWritable, GetUniquePath
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include <util/bitdeque.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/fs_helpers.h>
|
||||
#include <util/getuniquepath.h>
|
||||
#include <util/message.h> // For MessageSign(), MessageVerify(), MESSAGE_MAGIC
|
||||
#include <util/moneystr.h>
|
||||
#include <util/overflow.h>
|
||||
@@ -1245,22 +1244,6 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
|
||||
fs::remove_all(dirname);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_DirIsWritable)
|
||||
{
|
||||
// Should be able to write to the data dir.
|
||||
fs::path tmpdirname = m_args.GetDataDirBase();
|
||||
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), true);
|
||||
|
||||
// Should not be able to write to a non-existent dir.
|
||||
tmpdirname = GetUniquePath(tmpdirname);
|
||||
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), false);
|
||||
|
||||
fs::create_directory(tmpdirname);
|
||||
// Should be able to write to it now.
|
||||
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), true);
|
||||
fs::remove(tmpdirname);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_ToLower)
|
||||
{
|
||||
BOOST_CHECK_EQUAL(ToLower('@'), '@');
|
||||
|
||||
Reference in New Issue
Block a user