Changeset View
Changeset View
Standalone View
Standalone View
src/test/fs_tests.cpp
// Copyright (c) 2011-2019 The Bitcoin Core developers | // Copyright (c) 2011-2019 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
// | // | ||||
#include <fs.h> | #include <fs.h> | ||||
#include <test/setup_common.h> | #include <test/setup_common.h> | ||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(fsbridge_fstream) { | BOOST_AUTO_TEST_CASE(fsbridge_fstream) { | ||||
fs::path tmpfolder = SetDataDir("fsbridge_fstream"); | fs::path tmpfolder = GetDataDir(); | ||||
// tmpfile1 should be the same as tmpfile2 | // tmpfile1 should be the same as tmpfile2 | ||||
fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; | fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; | ||||
fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃"; | fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃"; | ||||
{ | { | ||||
fsbridge::ofstream file(tmpfile1); | fsbridge::ofstream file(tmpfile1); | ||||
file << "bitcoin"; | file << "bitcoin"; | ||||
} | } | ||||
{ | { | ||||
Show All 37 Lines |