]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tests: shorten factor's inordinately-long test file names
authorBernhard Voelker <mail@bernhard-voelker.de>
Sat, 27 Oct 2012 11:24:18 +0000 (13:24 +0200)
committerJim Meyering <jim@meyering.net>
Sat, 27 Oct 2012 15:39:17 +0000 (17:39 +0200)
commit1cace4a832fe57a45d87b0579607c4d236cce457
tree59813a1fa54f590e51fda3c1cb5f90733c98a2f5
parent48536bfe8f7fe1d41d8ca71dc51c0550adb3b89a
tests: shorten factor's inordinately-long test file names

Besides what the subject says, this commit moves the test data
for the factor tests from tests/local.mk into the directory
tests/factor/ where it belongs.

* tests/local.mk (EXTRA_DIST): Add new tests/factor/create-test.sh.
(p,q,t1,t2) Factor out the factor-related magic numbers.
(factor_tests): Rename the test names to t{00..36}.sh. Factor out
the triples of test data.
($(factor_tests)): Add dependency to new
tests/factor/create-factor.sh.
Call that script to generate the test scripts.
* tests/factor/run.sh: Turn this script into a template, and
therefore remove it's executable permission bit.
Add template variables START, END and CKSUM, replacing the code
to split the test data from the test script's file name.
Use the new template variables in the call to seq and for
creating the exp file.
* tests/factor/create-test.sh: Add new script to create the
test scripts from the template tests/factor/run.sh.
Use test data and magic numbers factored out from the above
files. Let the script also change the __TEMPLATE__ line in
run.sh to make clear that the test scripts are generated.
* cfg.mk (sc_tests_list_consistency): Exempt the new test.
(exclude_file_name_regexp--sc_prohibit_test_backticks):
Likewise.

Improved-by: Stefano Lattarini
Improved by: Jim Meyering
cfg.mk
tests/factor/create-test.sh [new file with mode: 0755]
tests/factor/run.sh [changed mode: 0755->0644]
tests/local.mk