Main changes:
* Removed ability to guess, search and merge files.
Old inigrep was doing too much. Instead of just being "grep for
INIs", it tried to guess file arguments, look for data in local
folders and smartly merge files based on locality, effectively
becoming sort of a configuration registry tool. While that function
can be (and was) highly useful, it is vastly outside inigrep's main
purpose; coupling like this made inigrep much harder to understand.
At the same time, only saturnin applications really used this;
so it became obvious where such behavior belongs, so relevant
code was moved to saturnin__conf, which now acts as wrapper around
the new inigrep.
* Rewrote API.
Old API was designed around the original idea, long long time ago,
when use cases were not clear yet. This fact propagates as the old
API being a bit gimmicky, too "granular" with little usability gain
but great graspability loss.
New API, on the other hand, simplifies section/key syntax and
concentrates on few simple modes, easy to understand and/or ignore.
* Added module-level documentation.
Now that shellfu-doc can work as manpage reader, it would be shame
to not include at least some basic documentation inside modules.
inigrep (albeit being one-function module) is proud to be the first
one in shellfu core module set to have at least simple introduction.
Somehow this did not break anything. The sole fact that the argument was
"ignored" was most bug in itself but we're not going to fix it as the
code gets rewritten any moment now.
Once simple.sh has been cleaned up and simplified in previous ~10
commits, it turns out that all it does is manage subtests.
Reflect that in the name.
(Doc will be updated later.)
Restructure test folders to separate test/oracle/result
Support test folder structure where test, oracle and generated result
data are stored each in separate directory. This makes it easier to
ensure legible diff output without cluttering the filenames too much.
Most changes are in tf_do_subtest.
* Separated setup/cleanup logic from test data collecting and
execution/evaluation.
* Revamped the execution/evaluation logic in a new tool testflt,
allowing tester to use it as the need be.
* Code to compose actual test command removed, as testflt makes it
easy to write the code in one place (TF_RUN) and keep simple things
simple.
* Removed tf_parse_meta, as it's obsolered by above changes.
* Updated tests to reflect the new style.
This new hierarchy makes it easier to work simultaneously on data and
the script, simplifies deployment to tempdir and makes the launching
script naming consistent with simple.sh.
Although pretty, this way of initializing ffoo must go since it's
not possible to protect it with a working `|| exit 3` clause.
Problem is that bash will create the pipe no matter if the ffoom call
eventually succeeds or not, so in case ffoom is not ready we end up
sourcing and empty file--which always succeeds.
config.cfgrep does better job at hinting how the function works
(i.e. somehow similar to UNIX grep) and that the use is not limited to
INI files.
Also default config file suffix is now "conf".
As a followup to last revamp:
* Use more extensible test definition format,
* separate testing framework from setup script and split to includes,
* update test scripts as well as data,
* consolidate test output,
* and make some small improvements/fixes on the way.