tests/programs-primary-rewritten.test


Log

Author Commit Date CI Message
Stefano Lattarini 5b44ce39 2012-02-23T13:07:57 tests: quote 'like this', not `like this', as per GCS recommendation This patch converts the automake testsuite and related files, to the use of new quoting format 'like this' or "like this" rather than `like this'. This is done for consistency with the new recommendations in the GNU Coding Standards, and, well, because I've come to actually prefer the '...' and "..." quoting formats over the `...' one. * tests/README: Update quoting format throughout. Remove some "excessive" use of quoting, and throw in minor rewording where appropriate. * tests/Makefile.am: Likewise, for comments. * tests/CheckListOfTests.am: Likewise. * tests/defs-static.in: Likewise. * tests/defs: Likewise. * tests/trivial-test-driver: Likewise. * Many tests/*.tap, tests/*.test and tests/*.sh files: Likewise, and for the diagnostic and informational messages as well. * tests/gen-testsuite-part: Likewise, and for the generated tests as well.
Stefano Lattarini db973eaa 2012-02-21T19:47:36 tests: prefer 'configure.ac' over 'configure.in' With this change, our testsuite now uses 'configure.ac' as the name for the typical autoconf input, instead of the obsolescent 'configure.in' (which has been deprecated for several years, at least since autoconf 2.50). Most of the test cases changed by this commit have been automatically modified with this sed command (using GNU sed): sed -i 's/\<configure\(\\\?\)\.in\>/configure\1.ac/g' * syntax-checks.mk (sc_tests_no_configure_in): New syntax check. (syntax_check_rules): Add it. * tests/defs: Create stub for autoconf input in 'configure.ac', not in 'configure.in'. Adjust comments. ($AUTOCONF, $AUTOHEADER, $AUTORECONF): Remove workaround for the infamous debian autoconf wrapper: we don't need such workaround anymore now that we name our autoconf input as 'configure.ac'. For more information, see commit v1.11-564-g63da492 "test defs: hack to support autoconf-wrapper programs" of 16-12-2011. * tests/README: Use 'configure.ac', not 'configure.in'. * Many many tests: Likewise. * tests/backcompat3.test: Adjust to avoid spurious failures. * tests/backcompat5.test: Likewise. * tests/missing6.test: Likewise. * tests/backcompat6.test: Likewise, and extend a bit since we are at it.
Stefano Lattarini 641a5a4b 2012-02-16T10:46:23 maint: run "make update-copyright"
Stefano Lattarini 96401cb9 2012-02-06T15:48:30 tests: better way to compare lists in Makefile rules With this commit, we introduce a new helper shell script for use in the testsuite, which is meant to allow the test cases to easily check whether two whitespace-separated lists are equal; this ability is particularly useful to check for equality of the contents of make variables that are expected to contain multiple whitespace-separated words, and are defined through line continuations (or are rewritten by automake in this way), or that contain expansion of potentially empty variables. Before this change, a test checking that an usage like this one: VAR = valA if COND1 VAR += val1 # com1 endif COND1 VAR += valC worked as expected, couldn't use rules like: ## Doesn't work because $(VAR) expands to multiple words verify: test $(VAR) = "valA val1 valC" nor like: ## Doesn't work because the final expansion of $(VAR) contains ## repeated contiguous whitespace characters (it actually ## equals "valA val1 valC", not "valA val1 valC"), and this ## is an internal detail which might change and which we don't ## want to explicitly rely on. verify: test "$(VAR)" = "valA val1 valC" Instead, we had to rely on cumbersome workaround such as: ## This works, but is ugly. verify: test "`echo $(VAR)`" = "valA val1 valC" or: ## This works, but is even uglier. verify: echo BEG: $(VAR) :END | grep "BEG: valA val1 valC :END" Now, with the help of the new 'is' script, we can perform such a check in a clearer and more straightforward way, as in: ## Works, and reads clearly. verify: is $(VAR) == valA val1 valC * tests/is: New helper shell script, telling whether two whitespace separated lists are equal. * Makefile.am (EXTRA_DIST): Add it. * tests/colneq2.test: Use the new helper script, and accordingly get rid of older, more cumbersome idioms. * tests/cond11.test: Likewise. * tests/cond16.test: Likewise. * tests/cond18.test: Likewise. * tests/cond22.test: Likewise. * tests/cond31.test: Likewise. * tests/cond38.test: Likewise. * tests/test-logs-repeated.test: Likewise. * tests/objext-pr10128.test: Likewise. * tests/programs-primary-rewritten.test: Likewise. * tests/substre2.test: Likewise. Also ... (configure.in, Makefile.am): Add a couple of hack to avoid having to require (and run) a C compiler; accordingly ... ($required): ... remove this. * tests/exeext4.test: Likewise. * tests/substref.test: Likewise. Also ... (hello.c): Use ": >" rather than "cat <<EOF" to generate it, since it's meant to be empty anyway. * tests/cond4.test: Use the new helper script, and accordingly get rid of older, more cumbersome idioms. Avoid some unnecessary uses of "make -e" since we are at it. * tests/cond19.test: Likewise. * tests/cond32.test: Likewise. * tests/cond6.test: Use the new helper script, and accordingly move some checks in the Makefile.am. Avoid unnecessary execution of automake remake rules by manually "touching" aclocal.m4
Stefano Lattarini 02742f0f 2011-05-26T22:28:45 tests: split 'subst2.test' to improve modularity and coverage * tests/subst2.test: Test removed, split into ... * tests/programs-primary-rewritten.test: ... this test ... * tests/subst-no-trailing-empty-line.test: ... and this one ... * tests/extra-programs-empty.test: ... and this one. * tests/Makefile.am (TESTS): Update.