aboutsummaryrefslogtreecommitdiff
path: root/src/test/fs_tests.cpp
AgeCommit message (Collapse)Author
2022-03-03test: Correctly decode UTF-8 literal string pathsRyan Ofsky
Call fs::u8path to convert some UTF-8 string literals to paths, instead of relying on implicit conversions. The implicit conversions incorrectly decode const char* paths using the current windows codepage, instead of treating them as UTF-8. This could cause test failures depending what environment windows tests are run in. Issue was reported by MarcoFalke <falke.marco@gmail.com> in https://github.com/bitcoin/bitcoin/pull/24306#discussion_r818566106
2022-02-18test: Run symlink regression tests on WindowsMarcoFalke
2022-02-17test: Add fs_tests/create_directories unit testHennadii Stepanov
2022-02-14test: Add fs_tests/rename unit testHennadii Stepanov
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2022-02-03refactor: replace boost::filesystem with std::filesystemKiminuo
Warning: Replacing fs::system_complete calls with fs::absolute calls in this commit may cause minor changes in behaviour because fs::absolute no longer strips trailing slashes; however these changes are believed to be safe. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2021-12-30scripted-diff: Bump copyright headersHennadii Stepanov
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./ -END VERIFY SCRIPT- Commits of previous years: * 2020: fa0074e2d82928016a43ca408717154a1c70a4db * 2019: aaaaad6ac95b402fe18d019d67897ced6b316ee0
2021-10-05refactor: Add fs::PathToString, fs::PathFromString, u8string, u8path functionsRussell Yanofsky
There is no change in behavior. This just helps prepare for the transition from the boost::filesystem to the std::filesystem path implementation. Co-authored-by: Kiminuo <kiminuo@protonmail.com>
2021-05-24scripted-diff: Change `ArgsManager.GetDataDirPath()` to ↵Kiminuo
`ArgsManager.GetDataDirBase()` in tests -BEGIN VERIFY SCRIPT- git ls-files src/test/*_tests.cpp src/test/util/setup_common.cpp | xargs sed -i 's/.GetDataDirPath()/.GetDataDirBase()/g'; -END VERIFY SCRIPT-
2021-04-18scripted-diff: Modify unit tests to use the ArgsManager in the ↵Kiminuo
BasicTestingSetup class instead of implicitly relying on gArgs. -BEGIN VERIFY SCRIPT- git ls-files src/test/dbwrapper_tests.cpp src/test/denialofservice_tests.cpp src/test/flatfile_tests.cpp src/test/fs_tests.cpp src/test/settings_tests.cpp src/test/util_tests.cpp | xargs sed -i 's/GetDataDir()/m_args.GetDataDirPath()/g'; -END VERIFY SCRIPT-
2021-02-04Introduce GetUniquePath(base) helper method to replace ↵Kiminuo
boost::filesystem::unique_path() which is not available in std::filesystem.
2021-01-15Replace fs::absolute calls with AbsPathJoin callsKiminuo
This adds better test coverage and will make it easier in #20744 to remove our dependency on the two-argument boost::filesystem::absolute() function which does not have a direct equivalent in C++17.
2019-11-06scripted-diff: test: Move setup_common to test libraryMarcoFalke
-BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
2019-10-15tests: Fix fs_tests for unknown localesDaki Carnhof
Fix by removing "L" as suggested by meeDamian in https://github.com/bitcoin/bitcoin/issues/14948#issuecomment-522355441 Co-Authored-By: bugs@meedamian.com
2019-06-26tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift
unused includes in tests
2019-06-20test: Create data dir in BasicTestingSetupMarcoFalke
2019-04-11scripted-diff: Bump copyright headers in test, benchMarcoFalke
-BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
2019-04-11scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
2018-09-26tests: Add test case for std::ios_base::ateChun Kuan Lee