summaryrefslogtreecommitdiffstats
path: root/bin/sh/tests/builtins
Commit message (Collapse)AuthorAgeFilesLines
* Convert bin/sh/tests to ATFngie2014-08-131-3/+7
| | | | | | | | | | | | | The new code uses a "test discovery mechanism" to determine what tests are available for execution The test shell can be specified via: kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh Sponsored by: EMC / Isilon Storage Division Approved by: jmmv (mentor) Reviewed by: jilles (maintainer)
* sh: Allow arbitrarily large numbers in break and continue.jilles2014-07-202-0/+9
| | | | The argument is capped to loopnest, so strtol()'s [ERANGE] can be ignored.
* Don't install locale1.0 if MK_NLS == no.jilles2014-07-081-0/+2
| | | | | | | | | | | | The test locale1.0 depends on locale support; it is meaningless without a working LC_MESSAGES. I added an OptionalObsoleteFiles.inc entry. PR: 181151 Submitted by: Garrett Cooper (original version) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division
* sh: In getopts, unset OPTARG where POSIX says we should.jilles2014-05-103-0/+14
|
* sh: Add new tests to the Makefile.jilles2014-05-101-0/+2
|
* sh: Don't discard getopts state on unknown option or missing argument.jilles2014-05-102-0/+13
| | | | | | | When getopts finds an invalid option or a missing option-argument, it should not reset its state and should set OPTIND as normal. This is an old ash bug that was fixed long ago in dash. Our behaviour now matches most other shells.
* sh: Send getopts error messages to stderr, not stdout.jilles2014-05-091-1/+1
| | | | Adjust a testcase for this change.
* sh: Add some tests for normal use of getopts.jilles2014-05-074-0/+29
|
* sh: Allow kill %job on jobs started without job control.jilles2014-03-152-1/+8
| | | | | | | | When killing a %job started without job control, kill all processes in it. As with process groups and zombies, if any process in the job can be killed or has already terminated, the command is successful. This also fixes occasional failures of the builtins/kill1.0 test.
* sh: Successfully do nothing when killing a terminated job.jilles2014-03-082-0/+9
| | | | | | If a job has terminated but is still known, silently do nothing when using the kill builtin with the job specifier. Formerly, the shell called kill() with the process group ID that might have been reused.
* sh: Do not corrupt internal representation if LINENO inner expansion fails.jilles2014-02-272-0/+11
| | | | | | Example: f() { : ${LINENO+$((1/0))}; } and call this function twice.
* sh: Solve the alias recursion problem in a less hackish way.jilles2014-01-243-3/+3
| | | | | | | | | Add the space to avoid alias recursion when the alias is expanded, not when it is added. As a result, displaying an alias via command -v, command -V or type no longer erroneously appends a space. Adjust the tests so they now require this bug to be absent.
* Migrate tools/regression/bin/ tests to the new layout.jmmv2013-12-11153-0/+2469
This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
OpenPOWER on IntegriCloud