Commit Graph

11 Commits

Author SHA1 Message Date
Paul Cornett
5cd5c878ee Avoid using wxString::ReadAll() on a file containing binary data
ReadAll() does character set conversion, which will likely fail
2017-10-01 09:17:49 -07:00
Dimitri Schoolwerth
3ae438b9ac Fix wrong variable name
The typo resulted in, depending on compiler used, an error ("undeclared
identifier") or warning. Fix by using the intended name.

Regression since 5552351393.
2017-04-08 11:44:02 +04:00
Vadim Zeitlin
e9ce55e000 Fix wxRmdir() with non-ASCII paths
Don't apply at best unnecessary, and actually harmful, as it uses a wrong
conversion, fn_str() when calling wxRmDir() which takes wxString.

Update unit tests to check that wxRmdir() now works with non-ASCII filenames
too.

Closes #17644.
2017-04-01 19:12:27 +02:00
Vadim Zeitlin
d145ef7205 Get rid of ugly "pUnitMsg" in the file functions unit test
No real changes, just simplify the code passing the message shown when a test
fails to CppUnit a bit.
2017-04-01 19:07:26 +02:00
jprotopopov
5552351393 Add unit tests for more file-related functions
Test wxDirExists(), wxIsAbsolutePath(), wxMkdir() and wxRmdir() too.

Closes #17830.
2017-04-01 18:47:16 +02:00
jprotopopov
9b1afaa7a6 Don't crash in wxFFile::Eof() and Error() if file is closed
Assert and return false instead, this is more developer-friendly.

Add unit tests to check that these functions really work as expected when
called on a closed file.

Closes #17828.
2017-04-01 18:43:13 +02:00
Vadim Zeitlin
8eac125e86 Revert "Temporarily ensure that the file functions test uses UTF-8"
This reverts commit a44bcb4746 which is not
necessary any more since the fixes to file name conversions in the previous
commit.
2016-02-19 02:52:43 +01:00
Vadim Zeitlin
a44bcb4746 Temporarily ensure that the file functions test uses UTF-8
Work around the bug in the library which prevents Unicode file names from
working under Unix unless we use an UTF-8 locale.

Closes #11404.
2016-02-13 17:21:52 +01:00
Artur Wieczorek
5245afa263 Add test cases to test file operations with Unicode file names
File names containing ASCII or non-ASCII (Unicode) characters are used in the
file function tests.
2016-02-13 04:01:28 +01:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Francesco Montorsi
69fc85873d moved non-interactive tests for wxDynamicLibrary, wxGet/SetEnv, wxTempFile, wxCopyFile to appropriate CppUnit test suites;
removed wxFile and wxTextFile tests (complete testsuites already exist for them)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-13 14:30:55 +00:00