Mooffie
5f4387cafb
extfs: uzip: add tests.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie
849d3e8f9d
extfs: uzoo: add tests.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-14 13:15:58 +03:00
Mooffie
a45c997696
extfs: documentation for the tester.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-14 13:15:58 +03:00
Mooffie
7a3891eb90
extfs: introduce a tester.
...
This tester tests that helpers implement the "list" command correctly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-14 13:15:58 +03:00
Mooffie
13a805bd79
Ticket #3730 : extfs: introduce a command-line tool for parsing file lists.
...
We introduce 'mc_parse_ls_l', a tool for parsing file-listings in format
similar to that of 'ls -l'. This format is used by the various extfs helpers.
We'll use this tool, in the next commit, to build a tester.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-14 13:15:29 +03:00
Mooffie
7be9334e45
Fix quotes handling.
...
Note: considering that this feature hasn't worked, we may consider removing it
entirely or partially (e.g., escaping) in order to simplify the code, as nobody
has grown used to it. It seems, based on the "hex mode" mentioned in the manual
page, that in the past there was no "normal" search in hex mode, and quoted
strings were the only easy way to look for text. This is no longer the case
nowadays.
Note: the characters in the quoted string are copied out as-is to the regexp.
No regexp-quoting is currently done. We may want to revisit this issue when we
work on ticket #3695 .
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie
64e6ccef7f
Handle invalid characters.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie
cc8fcdcfc0
Fix trailing whitespace problem.
...
sscanf() returns EOF when it reaches the end of the string. Our code
erroneously interprets this as if a number was read. The fix: we test for an
explicit '1'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie
b25af93874
Report errors to the user.
...
Instead of silently accepting invalid patterns, we notify the user of errors.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:26 +03:00
Mooffie
3332d1ebe4
Ticket #3694 : fix hex pattern parsing.
...
Add test for mc_search__hex_translate_to_regex().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:54:43 +03:00
Mooffie
306b30ed30
Ticket #3687 : store the 'hotlist' file in data dir, not config dir.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:48:02 +03:00
Andrew Borodin
2356acc26d
NULL-ize some variables to make unit tests happy.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-21 13:12:55 +03:00
Andrew Borodin
2151edaff2
Get rid of global variables mc_main_config and mc_panels_config.
...
Use mc_global.main_config and mc_global.panels_congig instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
eef076cef6
cppcheck: Cleanup Passing NULL after the last typed argument warning
...
Cleanup Passing NULL after the last typed argument warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Yury V. Zaytsev
a8f512c12c
Remove unneeded struct
keyword for typedef'd structs
...
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-03-04 09:23:38 +03:00
Andrew Borodin
a52cb840ae
(tree_chdir, sync_tree): take vfs_path_t object to avoid double conversion of path.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andreas Mohr
7146508b31
Cleanup: usermenu.c: use const edit_widget.
...
Use const because edit_widget not altered in these functions.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:37 +03:00
Andrew Borodin
dd60bf40dc
(get_random_hint): modify time measurement.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
6f5fc5d528
(get_random_hint): move to src/filemanager/midnight.c.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
c4258d453b
Clarify AM_CPPFLAGS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-03-04 09:23:36 +03:00
Andrew Borodin
c49d7f76b0
tests/lib/serialize.c: fix error codes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 10:08:08 +03:00
Andrew Borodin
98e66fe406
Ticket #3491 : fix case insensitive search in non-unicode locales.
...
In non-unicode locales, search for non-latin symbols in any acharset was
case sensitive only. This bug was introduced in
1a1496fc0d
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-02-02 09:37:15 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andreas Mohr
697e406eb8
Robust sizeof() usage at function parameter and use memcpy destination sizeof...
...
...for more resilient to errors.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:09 +03:00
Andreas Mohr
5007d309bc
Fix -Wconversion warning for mc_search_new().
...
mc_search_new() parameter orignial_len use once only.
Factor out into own function mc_search_new_len().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:07 +03:00
Slava Zanko
0e79be1b7a
Introduce mc_shell_t type.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2016-01-01 11:48:06 +03:00
Slava Zanko
bf1ff69fb8
Code refactoring
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-11-10 13:29:45 +03:00
Alexander Kriegisch
09ed02ea85
Minor code changes.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-11-10 11:55:38 +03:00
Andrew Borodin
d9ad3d2e32
Clarify __attribute ((format (printf))) usage.
...
Thanks Andreas Mohr <and@gmx.li> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-11-05 14:33:20 +03:00
Andrew Borodin
2789e6e390
Ticket #3431 : add missing default cases.
...
Introduce -Wswitch-default check.
Some minor cosmetics.
Thanks Andreas Mohr <and at gmx dot li> for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:50 +03:00
Slava Zanko
517cc5cfe4
Fixes in tests
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-05-03 19:43:49 +03:00
Andreas Mohr
8a2f9e253d
Ticket #3430 : introduce -Wundef check to catch macro typos.
...
Use always defined MC_HOMEDIR_XDG macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Egmont Koblinger
1a1496fc0d
Ticket #3416 : viewer case insensitive search doesn't find accents.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-03-19 11:16:24 +03:00
Andrew Borodin
573136ac64
tests/lib/search/Makefile.am: fix name of variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-02-26 09:41:09 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Slava Zanko
4d2cefa81e
Add '?' sign as a possible mark of wildcard.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Boris Savelev
ec0dd74248
Fix for issue:
...
When copying to directory with a name containing special symbol "*" the copy command didn't do it in a right way.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Slava Zanko
dbbd8a7cdc
Ticket #3235 : copy files dosn't work as expected, when copying to a directory with the special symbol in its name
...
Add new test which covers current functionality of 'is_wildcarded' function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 13:25:46 +03:00
Boris Savelev
933fd255d0
Ticket #2743 : File selection by patterns uses bytes instead of (unicode) characters.
...
Using the "?" pattern in the file selection dialog brought up with '+',
mc uses the file name length in bytes instead of characters.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-25 12:59:57 +03:00
Boris Savelev
6ca737d230
The patch does not intend to fix all Bash patterns (I believe mc never claimed to support all kinds of them), but it fixes some issues.
...
Namely, backslash-escaped metacharacter like {}*? will remain in the pattern (with the current code it is just stripped). Second, comma will be transformed to | only inside a group.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-24 14:58:51 +03:00
Slava Zanko
0eca32a852
Ticket #2309 : "Shell patterns" broken beyond repair.
...
Fix tests execution. Add new test which covers current functionality of glob2regexp.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-02-23 16:31:37 +03:00
Andrew Borodin
47b02f4c23
Add test for mc_search_glob_prepare_replace_str().
2015-01-14 09:50:50 +03:00
Egmont Koblinger
bcb09f6ac4
Tickets #3250 , #3256 : rewrite mcview's rendering and scrolling
...
Major rewrite of mcview's parts responsible for rendering and scrolling the contents:
* no more partial lines at the top and failure to scroll when Up or Down
is pressed;
* better handling of CJK characters;
* handle combining accents;
* improved nroff support;
* more conventional scrolling behavior at the end of the file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-01-08 19:30:12 +03:00
Andrew Borodin
4dd577fbe0
mceditor: reimplement syntax name list using GPtrArray.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-12-10 13:04:24 +03:00
Andrew Borodin
c7ff7b3671
Fix editcmd__edit_complete_word_cmd test.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-10-03 13:44:44 +04:00
Andrew Borodin
60334cfce8
tests/lib/vfs: update copyright notice.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Slava Zanko
4449cfb3c5
Add tests for check that symlinks in cwd are handled correctly.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-12-27 19:07:58 +04:00
Andrew Borodin
9fcff743a7
Clarify usage of WPanel widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-25 13:47:40 +04:00
Slava Zanko
a57d45d590
Ticket #3098 : vfs_path_from_str_flags() doesn't support VPF_STRIP_HOME
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-08 16:57:42 +03:00
Andrew Borodin
f5f177e711
Fix indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-06 16:38:52 +04:00
Andrew Borodin
61dc030772
More tests for canonicalize_pathname().
...
(custom_canonicalize_pathname): fix wrong condition. Remove redundant
break.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Slava Zanko
8a28d3bac4
Rename type file_entry to the file_entry_t.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Andrew Borodin
3470695357
Rename macros related to dir_list::size.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
30cc6c6a29
Add dir_list::len member to keep number of items in list.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-19 16:22:30 +04:00
Andrew Borodin
dcf78f5382
Add threshold for file size.
...
Add "editor_filesize_threshold" ini option to ask open file if it size
is larger than specified threshold. Supported string value formats are:
"640000000", "64000K", "64M". Default value is 64M.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:20:40 +04:00
Andrew Borodin
ccf82ada12
Add functions to transform string to unsigned integer:
...
* (xstrtoumax): from gnulib.
* (parse_integer): from coreutils (dd.c).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:03 +04:00
Andrew Borodin
cd9a56109d
Refactoring editor buffer API of bytes/symbols get.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
45d8b20ad9
--with-edit: rename to --with-internal-edit.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-02 15:29:35 +03:00
Slava Zanko
9d081bec5a
Ticket #3020 : segfault on creating new file in external editor
...
Fixes for compiling code without warnings and errors when the --disable-editor option is specified
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-02 15:29:35 +03:00
Slava Zanko
d2eac2f5af
Code reorganization and fixes around the vfs_path_as_str() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-28 09:21:16 +04:00
Andrew Borodin
3662b84ba1
(vfs_get_encoding): optimization and enhancement:
...
* get rid of extra memory duplication;
* support of recursive search of correct encoding;
* add tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Slava Zanko
2640b21bb9
Remove vfs_path_to_str() function for avoid often memory allocations.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 14:21:01 +03:00
Andrew Borodin
31bacf56c9
Use G_N_ELEMENTS macro to calculate of array size.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 10:58:14 +03:00
Slava Zanko
4404af92c0
Ticket #2980 : Add missing doc/hints french translation
...
Hints was split by paragraph (by double new line symbol instead of single newline symbol)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-04-02 11:07:42 +03:00
Slava Zanko
fa9c933ce0
Add test_autocomplete_single() test
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-28 16:53:04 +04:00
Slava Zanko
d0345661d8
Add tests for coverage the bug.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-28 16:50:28 +04:00
Slava Zanko
79ee80c201
Code refactoring in tests.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:19 +04:00
Slava Zanko
1bd438923d
Code refactoring in tests.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:19 +04:00
Slava Zanko
063d5a134f
Code refactoring in tests.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Slava Zanko
c984447f8e
Rename vfs_path_cmp() to vfs_path_equals()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Andrew Borodin
8454f12f8f
Ticket #2954 : fix typo: occured -> occurred.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Slava Zanko
61fb6e33b3
Code refactoring in tests.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Slava Zanko
0e3550594f
Create tests/mctest.h with useful inline macros
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Slava Zanko
5f99213a5e
Ticket #2944 : Prepare for release mc-4.8.8
...
Code indentation in tests.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:17 +04:00
Slava Zanko
278178093e
Add support of reading parameters for external editor/viewer from main config.
...
for example, the config file may contain strings:
[External editor or viewer parameters]
vim = %filename +%lineno
mcedit = %filename:%lineno
And these external editors will open a file at the previously saved position.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
808988b1f1
Add lib/strutil/replace:str_replace_all() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
2a2bc56221
Add src/execute.c:execute_external_editor_or_viewer() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
f43b83e7ee
Add tests for src/execute.c:execute_with_vfs_arg() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
c2f030f2e8
Add new functions:
...
* int my_systeml (int flags, const char *shell, ...);
* int my_systemv (const char *command, char *const argv[]);
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
254aa70ac8
Add tests for lib/utilunix.c:my_system() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:32 +03:00
Andrew Borodin
0c52b2bad6
Add tests for mc_search__translate_replace_glob_to_regex() function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:30:38 +04:00
Slava Zanko
f7109ab46b
Fix for input completions with spaces in names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Slava Zanko
f866709186
Concretize the usage of autocompliting in different input fields.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Slava Zanko
9935acea33
Ticket #55 : savannah: tab completion vs. spaces and escaping
...
* Split big functions.
* Add unit tests
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:29:15 +03:00
Slava Zanko
ee8aaf6181
Avoid compiler errors like: error: variable 'xxx' set but not used [-Werror=unused-but-set-variable]
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-01-17 15:21:35 +03:00
Andrew Borodin
9423f3f080
Avoid C++-style comments.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Slava Zanko
e13437d950
(exec_get_export_variables_ext): use g_new0() for stable test results.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 15:35:40 +04:00
Slava Zanko
a1dd199723
Fixes in exec_get_export_variables_ext test
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 13:48:26 +03:00
Slava Zanko
076e53550d
Fixed exec_get_export_variables_ext test
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 13:13:40 +03:00
Slava Zanko
5e633c7ca1
Ticket #2883 : non-portable test
...
Test has been rewritten for support actuality.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 12:48:42 +03:00
Andrew Borodin
60727b9b79
Clarify usage of AM_CPPFLAGS.
...
Use AM_CPPFLAGS not AM_CFLAGS for includes. GLIB_CFLAGS are CPPFLAGS, actually.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Slava Zanko
467677ee6a
Added tests for name_quote function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-29 13:20:47 +03:00
Slava Zanko
f115ac627f
exec_get_export_variables(): reproduce bug in test
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-29 13:20:47 +03:00
Slava Zanko
6bdf50c5a5
Ticket #2913 : CVE-2012-4463 mc-4.8.5: Does not sanitize MC_EXT_SELECTED variable properly
...
Paul Hartman reported the following (minor) security flaw into Gentoo's bugzilla:
https://bugs.gentoo.org/show_bug.cgi?id=436518
When multiple files are selected and F3 / Enter key is pressed on some of the files,
MC_EXT_SELECTED variable does not sanitize the whitespace characters properly
(leading into situation when first file is used as the actual value of MC_EXT_SELECTED
variable and the remaining files from the list are used as arguments passed to the
temporary script, created to handle F3 / Enter action on the first file).
A remote attacker could provide a specially-crafted archive and trick the local
Midnight Commander user into expanding and viewing it, which under certain
circumstances could lead to arbitrary code execution with the privileges of
the user running the mc executable.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-29 13:20:47 +03:00
Andrew Borodin
42499480bd
Ticket #2918 : cygwin test failure.
...
In
tests/lib/mcconfig/Makefile.am
tests/lib/vfs/Makefile.am
tests/src/filemanager/Makefile.am
AM_LDFLAGS = -Wl,-z,muldefs
is used, but on cygwin the linker does not accept the "-z" option and
AM_LDFLAGS = -Wl,--allow-multiple-definition
is required instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-14 13:32:55 +04:00
Andrew Borodin
b2f97443e2
Refactoring of subshell support.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:47 +04:00
Slava Zanko
bdd4cdbf82
Remove stub environment file from tests
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:47 +04:00
Slava Zanko
7668c09879
remove src/main.h file
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:46 +04:00
Slava Zanko
d6478b8b41
move do_cd from src/main.c to src/filemanager/panel.c
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:11 +04:00
Slava Zanko
949d257f37
Ticket #2791 : Fixed: cannot Copy/Move files with filename encoding change
...
Steps to reproduce:
* run mc
* change encoding one of panels to any different from system encoding
* try to copy any file to panel with changed encoding
Expected result: files should be copied.
Actual result: error box here.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-29 13:30:28 +03:00
Andrew Borodin
908e747861
Optimization of ini files load.
...
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
b37af47023
Makefile.ams cleanup.
...
Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Slava Zanko
6408811e18
Ticket #2803 : fixed bug do_panel_cd: FTBFS with --enable-tests on [kfreebsd-i386,kfreebsd-amd64,ia64,armhf]
...
One of the panel tests fail if build environment doesn't contain the home user directory.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-29 13:02:30 +03:00
Andrew Borodin
af3dd96e7b
Tests tweak and cleanup in case of --disable-charset option usage.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-25 17:00:02 +04:00
Slava Zanko
ca4e66d174
Ticket #2804 : fixed defect: path_cmp: FTBFS with --enable-tests on [powerpc,s390,s390x]
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-06 16:02:30 +03:00
Andrew Borodin
c1f2a8ac49
Clean up stuff that is not used anymore.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-05 13:06:27 +04:00
Andrew Borodin
41f7e490ea
Ticket #2786 : added forgotten test source file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-25 19:07:48 +03:00
Andrew Borodin
1c05ebf8b9
(do_load_dir): use vfs_path_t as a path handle.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Slava Zanko
4184555b82
Ticket #2760 : The password for session ftp remains in input history
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-12 22:31:20 +03:00
Sergei Trofimovich
41d093afaf
Ticket #2768 ('make check' failed)
...
tests/.../do_panel_cd.c: fix test when 'HOME' contains trailing slashes.
Steps to reproduce:
$ HOME=${HOME}/ make check
Running suite(s): /src/filemanager
cwd=/subvolumes/var_tmp/paludis/app-misc-mc-9999/temp
mc_config_get_home_dir ()=/subvolumes/var_tmp/paludis/app-misc-mc-9999/temp/
0%: Checks: 1, Failures: 1, Errors: 0
do_panel_cd.c:86:F:Core:test_do_panel_cd_empty_mean_home:0: Assertion 'ret' failed
The patch adds home dir path normalization.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-04-02 20:22:27 +03:00
Sergei Trofimovich
6d3b90247b
tests/.../do_panel_cd.c: show patch mismath on test failure
...
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-03-31 22:10:40 +03:00
Slava Zanko
88483f5fac
Fixed creating string from relative non-local VFS.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:28:45 +03:00
Slava Zanko
ecda2061f2
Ticket #2758 : cd command not working in shell link
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:28:45 +03:00
Slava Zanko
af1f37b967
fixup! Added tests for examine_cd() function.
2012-03-06 11:52:32 +03:00
Slava Zanko
05d220a9c6
vfs_path: Fixed broken relative paths processing.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
a8da7179d0
Return values of following functions are constants now:
...
* vfs_path_get_last_path_str()
* vfs_path_get_last_path_vfs()
* vfs_path_get_by_index()
* vfs_class_find_by_handle()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-06 11:52:31 +03:00
Slava Zanko
c9af137914
Changed lot of functions in src/ directory
...
...to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
2b5c28b316
Changes to handle vfs_path_t object:
...
* removed strip_password () function;
* Added new vfs_path flag: VPF_HIDE_CHARSET;
* added vfs_path_add_element() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
18d8b06238
VFS: Added new function vfs_path_to_str_flags()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
4dde82c5be
Changed do_cd() and do_panel() functions
...
...to handle vfs_path_t objects.
Changed panelized_panel_t.root type to vfs_path_t.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
a3a1e7937f
Added unit test for do_panel_cd() functions.
...
Check if empty directory is mean 'change current directory to home dir'.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
ddf8c542c9
Added function vfs_path_cmp()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
b319ddfbab
Added vfs_path_cmp() ans vfs_path_ncmp() functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
0aa10fd6cb
Changed type of WPanel::cwd (char *) and WPanel::lwd (char *)
...
...to WPanel::cwd_vpath (vfs_path_tr *) and WPanel::lwd_vpath (vfs_path_t *).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:50 +03:00
Slava Zanko
66e5af24d9
Added new fnction for manipulate vpath objects:
...
* vfs_path_append_vpath_new ()
* vfs_path_vtokens_get ()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
a34a3b3aa5
Added vfs_path_tokens_count() and vfs_path_tokens_get() functions
...
...for easy work with vfs_path_t tokens.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
389ac85992
Changed input parameters of mc_mkstemp() and mc_tempdir() functions
...
to handle vfs_path_t type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
f2dc217060
Added unit-tests for mc_tmpdir() and mc_mkstemps() functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
8ec4f94dc6
changed interface of function mc_chdir() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Andrew Borodin
ec476d0b88
Added tests for examine_cd() function.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-24 09:39:04 +03:00
Sergei Trofimovich
931819039e
Ticket #2732 : fix vfs test build failure on alpha
...
The test fails to compile on alpha:
> CC vfs_parse_ls_lga.o
> vfs_parse_ls_lga.c: In function ‘test_vfs_parse_ls_lga’:
> vfs_parse_ls_lga.c:174:9: error: unknown field ‘st_atime’ specified in initializer
> vfs_parse_ls_lga.c:175:9: error: unknown field ‘st_mtime’ specified in initializer
as st_atime on alpha in not just a field name:
struct stat {
...
__extension__ union { struct timespec st_atim; struct { __time_t st_atime; unsigned long st_atimensec; }; };
__extension__ union { struct timespec st_mtim; struct { __time_t st_mtime; unsigned long st_mtimensec; }; };
__extension__ union { struct timespec st_ctim; struct { __time_t st_ctime; unsigned long st_ctimensec; }; };
};
The fix switches to old-style struct initialization.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-02-13 14:18:31 +03:00
Sergei Trofimovich
3e4d6d6b76
Ticket #2732 : tests/lib/vfs/Makefile.am: drop muldefs from CFLAGS
...
Otherwise gcc on alpha/arm will break in gcc -c phase:
CC config_string.o
armv5tel-softfloat-linux-gnueabi-gcc <skip> -z muldefs -c config_string.c
armv5tel-softfloat-linux-gnueabi-gcc: muldefs: No such file or directory
make[4]: *** [config_string.o] Error 1
Gentoo-bug: http://bugs.gentoo.org/403343
Reported-by: Markus Meier
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2012-02-13 14:18:16 +03:00
Slava Zanko
162a330f42
Added unit test for mc_config_get_full_path() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
490711fca7
Added forgotten file to distribution for tests
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-19 15:06:40 +03:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Slava Zanko
4e295b261b
vfs_parse_ls_lga: The checks for timestamp is commented out.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 13:36:06 +03:00
Slava Zanko
1759de7cd5
Include config.h to all test's files
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 15:15:15 +03:00
Slava Zanko
d5e6dceed8
vfs_parse_ls_lga: Make tests output more verbose
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 14:57:28 +03:00
Andrew Borodin
79023b26a4
(mc_build_filename): incorrect processing of first element of path.
...
If first element is relative, the result path should be also relative
not absolute.
If first element is empty, the result path is relative.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
12dfe1bd55
VFS ftpfs: fixed broken filenames in unaligned 'ls' command output
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
20a79d52ab
Ticket #2595 : Broken panels recode in current master
...
Fixed path recoding
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
d3bb9de01f
Ticket 2570: Code cleanup
...
Moved tests from lib/tests to tests/lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 20:23:44 +03:00