summaryrefslogtreecommitdiffstats
path: root/regress/bin/ksh (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Test case for read-only array being not that read-only in ksh.zhuk2021-03-051-1/+14
| | | | okay tb@
* As in emacs.sh -r1.11 by jca, don't test the behavior of ^L. Withtb2020-09-201-3/+2
| | | | millert's clear-screen change in vi.c -r1.57 it now depends on $TERM
* Adapt regress to IFS splitting correction (eval.c -r1.66)tb2020-09-131-3/+3
| | | | From Martijn Dekker
* Add support for set -o pipefailjca2020-07-071-1/+89
| | | | | | | | | | | | | | | | With the pipefail option set, the exit status of a pipeline is 0 if all commands succeed, or the return status of the rightmost command that fails. This can help stronger error checking, but is not a silver bullet. For example, commands will exhibit a non-zero exit status if they're killed by a SIGPIPE when writing to a pipe. Yet pipefail was considered useful enough to be included in the next POSIX standard. This implementation remembers the value of the pipefail option when a pipeline is started, as described as option 1) in https://www.austingroupbugs.net/view.php?id=789#c4102 Requested by ajacoutot@, ok millert@
* Add test covering revision 1.64 of c_sh, fix exit code of compound listsanton2020-05-221-1/+12
| | | | while using option e.
* Don't test the behavior of ^L as it depends on $TERMjca2019-04-031-5/+1
| | | | Suggested by anton@
* a handful of new tests related to expr.c rev. 1.34schwarze2019-02-211-0/+63
|
* Fix kill [-SIGNAME | -s SIGNAME] and simplifyjca2018-12-081-2/+1
| | | | | | While the code intended to support both -s NAME and -s SIGNAME, the tests performed were wrong. Replace convoluted code with less cryptic conditionals. ok anton@
* Basic regress test for kill -s SIG[NAME] (now failing)jca2018-12-081-1/+9
| | | | Prodded by anton@
* test that PWD and OLDPWD are exportedanton2018-09-291-1/+12
|
* Add a test related to variable expansion that used to trigger the segfault seenanton2018-07-091-1/+4
| | | | | | in the installer. from tb@
* Add test covering variable expansion referencing multiple read-only variables.anton2018-07-081-1/+14
|
* Add test for proper stack reallocation in time commandkn2018-04-241-1/+12
| | | | OK jca
* Support 64 bit integers on 32 bit architectures.tobias2018-04-091-0/+11
| | | | | | | No binary change on amd64 and there should be no differences on any other 64 bit architecture either (because long = int64_t). ok cheloha, tb
* Fix tyopsjca2018-01-121-2/+2
|
* Add tests for [[:foo:]] character classes in globsjca2018-01-121-0/+31
|
* Add basic tests for octal and hex notation in arithmetic expansionsjca2018-01-121-0/+44
| | | | | POSIX requires only decimal, octal and hex, tests for the $((x#number)) notation could be useful too.
* Add tests for emacs editing mode in ksh. While here, improve the output on testanton2017-11-212-12/+245
| | | | failure.
* Do not exit 0 if the program was terminated due to receipt of a signal otheranton2017-11-211-2/+11
| | | | than SIGHUP.
* Add tests for history load from file.anton2017-10-231-1/+39
|
* Run all ksh tests with MALLOC_OPTIONS=Santon2017-10-231-6/+9
|
* Add HISTCONTROL tests.anton2017-08-311-1/+61
|
* Make the edit regress tests respect the KSH variable just like the main regressanton2017-08-224-7/+13
| | | | | | | | tests. Makes it easier to run all tests using another binary: $ pwd /usr/src/regress/bin/ksh $ make KSH=/usr/src/bin/ksh/obj/ksh
* Add missing RCS IDs and zap redundant SRCS from Makefile.anton2017-07-224-0/+7
|
* The first version of the edit program used to test csh, ksh and mail was basedanton2017-07-194-40/+73
| | | | | | | | | | | | | | | on the following reasoning: once the program to test has written some data it has entered the main-loop and is by now ready to receive user input. At this point it should be safe to start writing input and once the program once again enters a blocking reading state, its done processing the input. This approach was sensitive to timing and determining when a shell is done processing its input (if ever) is tricky. This iteration of the edit program takes a new approach and uses presence of a prompt for synchronisation of I/O. It doesn't solve all problems but is a step in the right direction. Joint work with bluhm@
* anton@ has fixed the test script so that it can run as root. Removebluhm2017-07-061-6/+4
| | | | my workaround that switched to build user.
* Favor a UID-agnostic prompt in ksh edit mode tests. Allows the tests to passanton2017-07-052-111/+111
| | | | | | when executed as root. Spotted by bluhm@
* Revert previously added tests for file completion that are currently failing.anton2017-07-052-26/+1
| | | | Prodded by bluhm@
* Add tests for file completion in ksh emacs mode, currently failing.anton2017-07-052-4/+29
| | | | While here, pass the v option to hexdump in order to output all data.
* Switch to build user if run as root. Prompt output $ or # affects test.bluhm2017-07-041-2/+5
|
* Backout previous due to a bug discovered by zhuk@ that requires some tinkeringanton2017-07-041-0/+14
| | | | and is not an easy fix for now.
* Add support for pattern substitution to variables in ksh using a common syntaxanton2017-07-041-0/+133
| | | | | | borrowed from ksh93. Survived a ports build performed by naddy@ and encouraged by many.
* Capture SIGINT and print out all received output so far. Useful when debugginganton2017-06-251-7/+9
| | | | broken tests.
* Fix EOL tests for ksh vi mode.anton2017-06-201-4/+4
|
* Don't write input if ICANON is enabled. Also, write one byte at a time.anton2017-06-181-1/+7
|
* Pass the command to execute as an argument. Allows the edit program to beanton2017-06-172-6/+17
| | | | reused.
* Test insertion of unmatched meta sequence.anton2017-06-061-0/+3
|
* Test insertion of non-ASCII characters, in particular making sureschwarze2017-06-051-0/+59
| | | | | | | | that valid input does not cause writing invalid intermediate states to the terminal, and that invalid input is not delayed waiting for more input, but written through right away. Currently failing, but expected to be fixed shortly.
* Add new edit regress files.anton2017-06-055-0/+378
| | | | Absent from my previous commit.
* Rewrite ksh edit mode regression tests.anton2017-06-057-394/+2
| | | | | | | | Instead of calling x_vi() directly, run ksh in a pseudo tty. This makes the process of adding tests for emacs mode simpler since the code can be shared. With feedback and help from millert@ and schwarze@
* Allow replacement of UTF-8 characters in vi mode.anton2017-05-311-0/+3
| | | | | | Reported by Walter Alejandro Iglesias on tech@. ok schwarze@ tb@
* Fix cursor position while removing characters from the command line.anton2017-05-281-0/+1
| | | | | | While here, remove a condition that becomes redundant. ok schwarze@ tb@
* Add missing includes to avoid implicit function declarations.jsg2017-02-251-0/+1
|
* Remove and-list-error-3 test, it is obsoleted by seterror-11millert2016-12-111-22/+1
|
* Fixes descriptions for seterror tests 1, 2 and 4.millert2016-12-111-7/+132
| | | | | | | Add seterror tests 8-10 for better "set -e" coverage. Add seterror-11 test to exercise the bug with "set -e" and short-ciruited "&&" chains. From Kartik Agaram
* If a Makefile both defines SUBDIR and includes <bsd.regress.mk>,schwarze2016-09-292-20/+24
| | | | | | | | | | | | | the "all" target will depend on the "regress" target, so running "make all" will recurse into the subdirectories for "regress", and then recurse a second time into the same subdirectories for "all", running all the tests twice. Fix this by moving the Makefile to run the main-level tests into a subdirectory "main" and only including <bsd.subdir.mk> from the top level Makefile. Issue reported by otto@; patch OK'ed by otto@ and bluhm@.
* Adjusts some patterns, so that the warning messages ksh prints ifbluhm2016-09-274-35/+35
| | | | | it has no controlliing tty is not causing the test to fail. based on otto@'s work; OK otto@
* fix dependency, fixing regress if make regress is called with a clean objotto2016-09-271-2/+2
| | | | | | (like the parent does). When make is called in the parent dir, both make regress and make all are called for the vi subdir. Need to figure out how to avoid that.
* More ksh POSIX compliance fixes by Martijn Dekker:tb2016-03-211-1/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | This simple patch makes the 'command' builtin POSIX-compliant and consistent with other current shells. It fixes two things: a) 'command -v' does not find shell reserved words (a.k.a. keywords). For instance, 'command -v select' outputs nothing but should output 'select'. b) 'command -pv' always outputs the path of an external command, even if 'command -p' would execute a builtin. For instance, 'command -p kill' executes the 'kill' builtin, as expected, but 'command -pv kill' outputs '/bin/kill'. The '-v' option is supposed to reflect what would actually be executed, so 'command -pv kill' should output 'kill'. The -p option sets the PATH to a default system value before doing the search, but that has no bearing on the fact that builtins take precedence over external commands. The patch fixes both issues for 'command' without affecting the behaviour of the ksh-specific builtin 'whence', which is handled by the same C function. Regression test added to obsd-regress.t. Issues found and fixed by Martijn Dekker, ok millert@
* POSIX-compliant behavior of "set -u" regarding "$*" and "$@" specialsczarkoff2016-03-051-1/+12
| | | | | | All work done by Martijn Dekker OK millert@