2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-22 03:22:32 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
Alexander Grund
393b8d510a Add test for filebuf under non-windows 2020-01-02 18:47:53 +01:00
Alexander Grund
5813bfacec Add BOOST_NOWIDE_USE_FSTREAM_REPLACEMENTS macro
Allows to test the fstream classes on e.g. Linux
They were designed to work cross-platform
2020-01-02 18:47:53 +01:00
Alexander Grund
c50504e388 Rewrite test_fstream
Small functions testing subsets
Descriptive comments
Add some missing tests
2020-01-02 18:47:48 +01:00
Alexander Grund
10d43c46cd Create test_failed function for easier debugging
Can set breakpoints inside
2020-01-02 18:47:47 +01:00
Alexander Grund
1bff7b670c Remove usage of Boost.LightweightTest
Tests assume TEST terminates execution on failure which is not how BLWT behaves
2020-01-02 18:47:46 +01:00
Alexander Grund
5c684c0fe6 Combine cenv and system to cstdlib
Follows the C++ headers
2020-01-02 18:47:45 +01:00
Alexander Grund
695fb73512 Make instances of stackstring const where possible 2020-01-02 18:47:44 +01:00
Alexander Grund
42d11003a9 filebuf::open should return NULL on already open file 2020-01-02 18:47:43 +01:00
Alexander Grund
17b677aeec Fix wrong default args for fstream 2020-01-02 18:47:42 +01:00
Alexander Grund
042e5ee28c Test Copy & Swap of stackstrings 2020-01-02 18:47:41 +01:00
Alexander Grund
e780cce5cb Initialize buffer of stackstring and test it 2020-01-02 18:47:41 +01:00
Alexander Grund
16d98b0f15 Cleanup includes 2020-01-02 18:47:40 +01:00
Alexander Grund
dd2d60eda3 Add benchmark for fstream 2020-01-02 18:47:38 +01:00
Flamefire
7ab4edb18e Remove usage of BOOST_WORKAROUND 2019-12-29 21:20:46 +01:00
Flamefire
0f3f4ea69c Add missing include 2019-12-28 16:02:31 +01:00
Flamefire
3bd6eed183 Enforce uniform formatting via clang-format 2019-12-28 16:02:31 +01:00
Flamefire
d357f7108f Add CI for CMake project + consumer test 2019-12-27 14:26:31 +01:00
Flamefire
3d6c001fc4 Add proper CMake files 2019-12-27 14:26:31 +01:00
Flamefire
f95ef16706 Remove dependency on Boost.Locale
Copy utf.hpp from Boost.Locale
2019-12-27 14:26:31 +01:00
Flamefire
bf51a60bb9 Use boost/detail/workaround
Compatibility with Boost < 1.65
2019-12-20 20:34:47 +01:00
Flamefire
1d50c27dce Fix some warnings 2019-12-18 14:47:14 +01:00
Flamefire
91b3d90b49 Enable pedantic warnings & Werror for tests 2019-12-18 14:46:18 +01:00
Flamefire
bb743eedce Reduce dependency on Boost.Filesystem
Sort test cases in Jamfile and add missing one
2019-12-18 14:46:15 +01:00
Alexander Grund
9d6c93e055 Merge pull request #24 from Flamefire/putEnvFix
Add test for putenv without equals sign
2019-12-14 19:09:09 +01:00
Flamefire
2988c60f61 Handle failure in putenv caused by GLIBC extension
The GNU C library implementation provides a nonstandard extension.
If string does not include an equal sign:

putenv("NAME");

then the named variable is removed from the caller's environment.
http://man7.org/linux/man-pages/man3/putenv.3.html
2019-12-14 15:47:53 +01:00
Flamefire
035a21bc9e Add test for putenv without equals sign
Reproducer for #14
2019-12-14 15:47:53 +01:00
Flamefire
f2e95fc899 Remove trailing whitespace 2019-12-14 15:47:01 +01:00
Flamefire
a067f5808b Remove Debug code 2019-12-14 15:47:00 +01:00
Flamefire
7549c80457 Include C++ headers instead of C variants 2019-12-14 13:35:37 +01:00
Flamefire
872c8eb37f Fix iostream test
The standard guarantees only a putback of 1 char on stdin, our implementation has support for more
Also test that the values read on stdin are indeed UTF-8
2019-12-13 21:14:35 +01:00
Flamefire
f213fd90f4 Fix exception path of tests
Even in case of exceptions boost::report_errors has to be called
2019-12-13 19:24:44 +01:00
Peter Dimov
ddb2794705 Merge branch 'feature/temp-review-fixes' into feature/merge-review-fixes
Conflicts:
	include/boost/nowide/utf8_codecvt.hpp
	test/test_codecvt.cpp
	test/test_convert.cpp
	test/test_fs.cpp
2019-12-04 19:50:59 +02:00
Peter Dimov
98cda02480 Change line endings to LF 2019-12-04 19:37:20 +02:00
Peter Dimov
6df39fc829 Switch back to using test.hpp in tests 2019-12-04 16:29:56 +02:00
Peter Dimov
00024d47f6 Revert test/test.hpp 2019-12-04 16:22:03 +02:00
Peter Dimov
103a65a4ea Add import testing ; to test/Jamfile 2019-12-03 22:11:33 +02:00
Peter Dimov
45411c1cf6 Disable putback('a') test on libc++, as it fails 2019-12-03 20:25:53 +02:00
Peter Dimov
5d162694d3 Flush or seek is necessary between output and input (Alexander Grund) 2019-12-03 19:15:18 +02:00
Peter Dimov
c8fd7bc25a Revert "Disable 'complex io' test for libc++ as its std::fstream fails it"
This reverts commit 071a434d1d.
2019-12-03 19:11:47 +02:00
Peter Dimov
071a434d1d Disable 'complex io' test for libc++ as its std::fstream fails it 2019-12-03 17:54:43 +02:00
Peter Dimov
aad40783ec Use file prefix in test_fstream 2019-12-03 16:33:40 +02:00
Peter Dimov
3b20019524 Add missing include 2019-12-03 16:28:40 +02:00
Peter Dimov
ac7b93b55d Use lightweight_test 2019-12-03 16:21:45 +02:00
Peter Dimov
a233584d1e Add a unique prefix to all temporary files to allow parallel testing 2019-12-03 16:06:04 +02:00
Peter Dimov
92ca903c18 Add copyright and license 2019-12-03 15:49:37 +02:00
Peter Dimov
ccdd1ad1ee Fix line endings and whitespace 2019-12-03 06:54:10 +02:00
Peter Dimov
f84620d1f2 Use a random prefix instead of a temp directory, because Cygwin has separate win32 and posix cwd 2019-12-03 06:49:53 +02:00
Peter Dimov
56bcf134a6 Add copyright and license 2019-12-03 06:48:35 +02:00
Peter Dimov
8dc69504ca Disable MS deprecation messages using _CRT_SECURE_NO_WARNINGS, because this works for clang-cl as well 2019-12-03 04:46:53 +02:00
Peter Dimov
e4fe4faa47 Use a temporary directory for test_fstream.cpp, because of -jN 2019-12-03 04:39:35 +02:00