(edit_collect_completions): return GQueue. Use GQueue inside.
Do not return an empty queue, create it if needed only.
(edit_complete_word_cmd): Use GQueue inside. Ged rid of limitation
of completions count. Rename variable.
(editcmd_dialog_completion_show): take GQueue. Rename and reorder
arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Don't wanna accidentially add autogenerated files to the git repo,
so ignore them.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...after refactoring of SIGWINCH handling
(37ffc02422).
Replacing variable with pipe cause a timeout in original tty_got_winch()
in this test and test fails. Use an empty replacement of mc_refresh().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
As will be explained in a following commit, our rpm helper has a bug stemming
from the use of 'echo'.
Before we fix it, we update the test's "expected output" to reflect the
intended output (as it's currently reflects a faulty output).
Signed-off-by: Mooffie <mooffie@gmail.com>
The "expected output" files we provide must be generated in the same locale the
tester (that is, the helpers) are run. Otherwise helpers using the 'sort'
utility may generate output different than our provided "expected output",
hence failing the tests.
Therefore we:
(1) Regenerate the "expected output" files in the C locale.
(2) Make sure the tester is run in the C locale.
(Tip: to regenerate the "expected output" files we deleted all the *.output
files and run the tester with "LC_ALL=C ./run --create-output".)
Signed-off-by: Mooffie <mooffie@gmail.com>
We update our .output file to include the entries
`INFO/SCRIPTS/{PRE,POST}TRANS[PROG]`, which the rpm helper now emits.
(Tip: here's how we do this: we delete the output file and recreate it by
running the tester thus: "./run --create-output".)
Signed-off-by: Mooffie <mooffie@gmail.com>
In the future we will probably place each helper's tests in a separate folder.
We'll then get rid of this 'misc/rpm' folder by moving it there.
Signed-off-by: Mooffie <mooffie@gmail.com>
We use a 'spec' contributed by Jiri Tyr.
We keep the previous test (by renaming rpm.* to rpm.glib.*), though, in case
somebody wants to work on data from "the real world".
Signed-off-by: Mooffie <mooffie@gmail.com>
This is a preliminary step before being able to write tests for our rpm helper.
We introduce 'rpm2tags', a tool for converting RPM packages to parsable text
files. This will enable us to write tests that can run even where the 'rpm'
program isn't installed.
Signed-off-by: Mooffie <mooffie@gmail.com>
We introduce a mechanism by which tests can easily access configure-time
parameters (like @PERL@, @AWK@, ...).
It works by "sourcing" a file named config.sh (residing in the build tree):
. "$MC_TEST_EXTFS_CONFIG_SH"
$PERL -e 'print "hello"'
(Although config.sh has a shell syntax, Perl and Python programs too can
benefit from it, because it can be sourced into an .env_vars file and the
values exported from there.)
Of course, one can also use the traditional method, of *.in files listed in
configure.ac, but the mechanism introduced here is a more comfortable approach.
Signed-off-by: Mooffie <mooffie@gmail.com>
- We now have 4'th level headers: adjust --doc-depth.
- We have many short sections: highlight the active section's header.
Signed-off-by: Mooffie <mooffie@gmail.com>
We switch to a modern practice of using lowercase for private variables ("shell
variables") and uppercase for the system's ("environment variables"). Constants
too are made lowercase, as it takes a philosopher to define "constant".
This gives us two advantages:
- If an .env_vars file accesses a private variable (e.g. $DATA_DIR or $INPUT),
something we want to discourage, we'll easily see this.
- Somewhat confusing code like "MC_TEST_DATA_DIR=$DATA_DIR" (which was to occur
in the following patch) becomes self-documenting after the change.
Signed-off-by: Mooffie <mooffie@gmail.com>
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>
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>
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>
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>
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>
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>