Commit Graph

4 Commits

Author SHA1 Message Date
Pavel Raiskup
4985667996 gl-tests: dash && option-parser test fix
Rico pointed out that the testsuite failed on his system (dash
represented /bin/sh).  Turns out that 'shift' in dash exits shell
with exit status 2 when there are no items in the array.

The other issue was that 'test-option-parser.sh' did not
re-executed the test in proper shell, but in /bin/sh.

* gl/tests/test-option-parser-helper (test_parse_eat_test): Don't
shift for empty $@.
* gl/tests/test-option-parser.sh: Use $__GL_ALL_SHELLS_SHELL as
shell which runs the helper.
2016-02-03 10:12:33 +01:00
Pavel Raiskup
ae816aced1 gl-tests: make the failure more readable
* gl/tests/test-funclib-quote.sh (_compare_or_error): Put $1 into
error output, not having it like that was my mistake.
2015-11-30 07:11:10 +01:00
Pavel Raiskup
aabc46ac1b gl/tests: new tests for options-parser
* gl/build-aux/options-parser (func_parse_options): Put the info
message 'enabling shell trace mode' on stderr.
* gl/modules/options-parser-tests: New test module.
* gl/tests/test-option-parser.sh: New test-case.
* gl/tests/test-option-parser-helper: New test-case helper.
* bootstrap: Sync with option-parser.
2015-11-04 06:47:52 +01:00
Pavel Raiskup
f323f10d2b gl/tests: new tests for func_quote* family
* gl/modules/funclib.sh-tests: New test module.
* gl/modules/all-shells-tests: New test (helper) module.
* gl/tests/test-funclib-quote.sh: New test case.
* gl/tests/test-all-shells.sh: New gl test helper.
* cfg.mk (sc_useless_braces_in_variable_derefs): Whitelist
new test-funclib-quote.sh as the pattern is used there
intentionally.
(sc_space_tab): Likewise.
(sc_useless_braces_in_variable_derefs): Remove /cvsu pattern as
the file is not used with git.
(sc_prohibit_command_in_subst): New checker.
2015-11-03 20:38:39 +01:00