Commit Graph

14284 Commits

Author SHA1 Message Date
Mooffie d4ec872f37 Ticket #3744: extfs: u7z: add tests. 2016-12-24 09:58:53 +04:00
Mooffie fad265c5bd Ticket #3744: extfs: u7z: make it testable. 2016-12-24 09:58:53 +04:00
Yury V. Zaytsev 12dbd957c0 Merge branch '2707_extfs_u7z' 2016-12-24 09:46:13 +04:00
Mooffie f84c14bbce Ticket #2707: extfs: u7z: print() cleanup.
AWK's print() already writes OFS between expressions.
2016-12-24 09:45:59 +04:00
Mooffie 052bdec1ee Ticket #2707: extfs: u7z: sed portability.
'\s' is not portable.
2016-12-24 09:45:59 +04:00
Mooffie 5c3e999845 Ticket #2707: extfs: u7z: handle missing size.
The uncompressed size may be missing in 7z's output (gods know why). We use the
compressed size in this case.
2016-12-24 09:45:58 +04:00
Mooffie 02051d6090 Ticket #2707: extfs: u7z: make the code more readable. 2016-12-24 09:45:58 +04:00
Yury V. Zaytsev 66ae617b77 extfs: fix whitespace soup in u7z helper
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2016-12-24 09:45:58 +04:00
Yury V. Zaytsev 6938f1a52d Ticket #2707: extfs u7z helper - fix listing 7z archives w/o datetime info
7z archives can have entries without datetime info (7z a -mtm- ...). Currently,
u7z helper skips these entries. Fix this by detecting them and obtaining
archive file datetime using stat command with fallback to ls -lan.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2016-12-24 09:45:58 +04:00
Andrew Borodin f1bc44943c Merge branch '3730_extfs_tester_fix'
* 3730_extfs_tester_fix:
  extfs: urar: don't invoke 'rar' when running under the tester.
  Ticket #3730: extfs: don't run tester on "make check" if disabled.
2016-12-20 13:05:44 +03:00
Mooffie b8f7018725 extfs: urar: don't invoke 'rar' when running under the tester.
We want to prevent messages printed to STDERR when running the tester on
systems where rar is not installed.

(Yes, we could compress this new code to just one line, but...)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-20 09:37:22 +03:00
Mooffie 2c17c7d28b Ticket #3730: extfs: don't run tester on "make check" if disabled.
If the extfs VFS is disabled, there's no point in building and running the
tester.

(The "SUBDIRS =" line isn't needed, but it looks tidier this way, especially if
we later add subdirs for testing the other VFSs.)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-20 09:37:03 +03:00
Andrew Borodin 455316be9f tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c: fix warning:
tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c: In function 'string_date':
tests/src/vfs/extfs/helpers-list/mc_parse_ls_l.c:193:21: warning:
declaration of 'time' shadows a global declaration [-Wshadow]

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-19 13:26:48 +03:00
Andrew Borodin 403b43c05f AUTHORS: mooffie: extfs helpers tester.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-19 13:21:01 +03:00
Andrew Borodin 3a25b7198f Merge branch '3730_extfs_tester'
* 3730_extfs_tester:
  tests/src/vfs/extfs/helpers-list/Makefile.am: create run silently.
  Move extfs tester from tests/src/extfs-helpers-listcmd into tests/src/vfs/extfs/helpers-list.
  extfs: lslR: add tests.
  extfs: lslR: make it testable.
  extfs: urar: add tests.
  extfs: urar: make it testable.
  extfs: uzip: add tests.
  extfs: uzip: make it testable.
  extfs: uzoo: add tests.
  extfs: uzoo: make it testable.
  extfs: documentation for the tester.
  extfs: introduce a tester.
  Ticket #3730: extfs: introduce a command-line tool for parsing file lists.
2016-12-19 13:18:07 +03:00
Andrew Borodin 84cbca51af tests/src/vfs/extfs/helpers-list/Makefile.am: create run silently.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-19 09:39:48 +03:00
Andrew Borodin 9764511b08 Move extfs tester from tests/src/extfs-helpers-listcmd into tests/src/vfs/extfs/helpers-list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-19 09:39:15 +03:00
Mooffie 96313b16bc extfs: lslR: add tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie f2c8479a50 extfs: lslR: make it testable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie eded16b0e9 extfs: urar: add tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie c88517b055 extfs: urar: make it testable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie 5f4387cafb extfs: uzip: add tests.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-16 10:14:41 +03:00
Mooffie 88f3aeef24 extfs: uzip: make it testable.
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 66b43a6670 extfs: uzoo: make it testable.
Note how easy it is to make the helpers testable. MC_TEST_EXTFS_LIST_CMD is
explained in README.

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
Andrew Borodin 4b28a7e76e Merge branch '3696_uzoo_datetime_format'
* 3696_uzoo_datetime_format:
  extfs: fix documentation of allowed date formats.
  Ticket #3693: fix listing of zoo archive entries.
2016-12-13 13:18:43 +03:00
Mooffie 12812968c0 extfs: fix documentation of allowed date formats.
We also improve the documentation of vfs_parse_filedate(), which does the
actual work.

Note that in the user-facing documentation (extfs/helpers/README) there are
two things we prefer *not* to mention about vfs_parse_filedate's ability:

* Accepting the format "MM-DD-YY hh:mm[:ss]", as this two-digit year is
  more likely to confuse readers of such dates.

* Accepting '/', instead of '-', as the separator in MM-DD-YYYY. (Considering
  that some scripts do use '/', maybe we should mention it?)

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-13 13:14:43 +03:00
Andrey Tataranovich 752a7e4454 Ticket #3693: fix listing of zoo archive entries.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-13 13:14:43 +03:00
Andrew Borodin f2051b2e99 Merge branch '3589_hex_search_binary_data'
* 3589_hex_search_binary_data:
  Ticket #3589: make hex search work for binary data.
2016-12-10 18:41:12 +03:00
Mooffie 1d9cd68ac3 Ticket #3589: make hex search work for binary data.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-10 18:40:02 +03:00
Andrew Borodin 8834429989 Merge branch '3731_msg_changed_focus'
* 3731_msg_changed_focus:
  Ticket #3731: add new MSG_CHANGED_FOCUS message.
2016-12-10 18:31:50 +03:00
Andrew Borodin 8550044635 Ticket #3731: add new MSG_CHANGED_FOCUS message.
This message is sent to widgets'owner when widget's focus state is
changed.

Find file dialog: fix initial draw of ignore directories input line.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-10 18:31:03 +03:00
Andrew Borodin 87cc7baead Merge branch '3736_mc_tmpdir'
* 3736_mc_tmpdir:
  Ticker #3736: mc_tmpdir() use a buffer of only 64 characters.
2016-12-07 09:50:25 +03:00
Sorin Sbarnea 0cf8e8f6e0 Ticker #3736: mc_tmpdir() use a buffer of only 64 characters.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-07 09:47:55 +03:00
Mooffie 54a0ccecaa Ticket #3293: YAML syntax fixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-06 11:19:16 +03:00
Roman Belda 055a8c6a4f Ticket #3293: add YAML syntax highlighting. 2016-12-04 17:56:27 +03:00
Andrew Borodin 76849655ba Revert "Ticket #3724: add true color skins: "Four seasons"."
This reverts commit 7b9d78d28c.
2016-12-04 13:02:19 +03:00
Egmont Koblinger 7b9d78d28c Ticket #3724: add true color skins: "Four seasons".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 10:41:56 +03:00
Andrew Borodin 74cf8f4bee Merge branch '3735_mcedit_search_error_messages'
* 3735_mcedit_search_error_messages:
  Ticket #3735: mcedit: show backwards-search error messages.
2016-12-04 10:18:40 +03:00
Mooffie 5f73bd0ff3 Ticket #3735: mcedit: show backwards-search error messages.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 10:14:37 +03:00
Andrew Borodin 7bb0b519f4 Merge branch '3710_parse_window_state_char'
* 3710_parse_window_state_char:
  Ticket #3710: don't parse "window-state-char" and "window-close-char" as colors.
2016-12-04 10:02:12 +03:00
Andrew Borodin 0701bca6e3 Ticket #3710: don't parse "window-state-char" and "window-close-char" as colors.
The bug: in skin files, the "[editor]" section's "window-state-char" and
"window-close-char" (whose values, as the name implies, are single
characters) are parsed as color fg+bg+attr, and an ncurses/slang
colorpair is allocated for each.

The bug fix: move "window-state-char" and "window-close-char" keys from
"[editor]" section to "[widget-editor]" one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 10:01:57 +03:00
Andrew Borodin 92b7acf7bf Merge branch '3694_hex_pattern_parsing'
* 3694_hex_pattern_parsing:
  (mc_search__hex_translate_to_regex): remove explicit handling of 0x prefixes.
  (mc_search__hex_translate_to_regex): rename variables.
  (mc_search__hex_translate_to_regex): avoid string duplication.
  (mc_search__hex_translate_to_regex): clean up handling of 0x prefixes.
  Fix quotes handling.
  Handle invalid characters.
  Fix trailing whitespace problem.
  Report errors to the user.
  Ticket #3694: fix hex pattern parsing.
2016-12-04 09:56:20 +03:00
Mooffie eff4d74743 (mc_search__hex_translate_to_regex): remove explicit handling of 0x prefixes.
scanf("%x") knows to eat up this prefix[1][2], so we don't need to do this
ourselves.

[1] K&R's "The C Programming Language" documents "%x" as "hexadecimal
    integer (with or without leading 0x or 0X)"
[2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/scanf.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie f96b11cf66 (mc_search__hex_translate_to_regex): rename variables.
Now that the string isn't duplicated there's nothing "temporary" about it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie b2cbddb534 (mc_search__hex_translate_to_regex): avoid string duplication.
We can read from the source string directly, as we no longer modify it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00
Mooffie 78994224ce (mc_search__hex_translate_to_regex): clean up handling of 0x prefixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:55:27 +03:00