summaryrefslogtreecommitdiff
path: root/regress/bin/ksh
AgeCommit message (Collapse)Author
2021-09-02regress tests shouldn't set or modify MALLOC_OPTIONS unless they're actually ↵Jasper Lievisse Adriaanse
very specific behaviour document this accordingly in the guidelines section of the manpage ok bluhm@
2021-07-10minor nits:anton
* compile the edit utility once * emit a warning during timeout
2021-07-01Just in case another developer besides anton@ and myself even wants toIngo Schwarze
look at these tests: add a comment providing a high-level picture of what is going on here, such that everyday maintenance can be performed without going down the rabbit hole of subr.sh and edit.c.
2021-07-01We already tested all corner cases for two-byte and three-byte UTF-8Ingo Schwarze
sequences, but coverage of four-byte sequences was incomplete, which contributed to the recently fixed ksh(1) emacs.c bug not being found for some time. Consequently, add some tests covering + valid sequences starting with \0360, \0361, and \0363; + incomplete sequences starting with \0360 and \0361; + invalid (too low) sequences starting with \0360. OK anton@
2021-06-30The byte \0363 is not invalid in UTF-8.Ingo Schwarze
The incorrectness of this test was exposed by the bugfix in /usr/src/bin/ksh/emacs.c rev. 1.88 and reported to me by bluhm@. This is a minimal fix replacing the incorrect test line with two correct tests involving the same byte. OK anton@
2021-03-05Test case for read-only array being not that read-only in ksh.Vadim Zhukov
okay tb@
2020-09-20As in emacs.sh -r1.11 by jca, don't test the behavior of ^L. WithTheo Buehler
millert's clear-screen change in vi.c -r1.57 it now depends on $TERM
2020-09-13Adapt regress to IFS splitting correction (eval.c -r1.66)Theo Buehler
From Martijn Dekker
2020-07-07Add support for set -o pipefailJeremie Courreges-Anglas
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@
2020-05-22Add test covering revision 1.64 of c_sh, fix exit code of compound listsanton
while using option e.
2019-04-03Don't test the behavior of ^L as it depends on $TERMJeremie Courreges-Anglas
Suggested by anton@
2019-02-21a handful of new tests related to expr.c rev. 1.34Ingo Schwarze
2018-12-08Fix kill [-SIGNAME | -s SIGNAME] and simplifyJeremie Courreges-Anglas
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@
2018-12-08Basic regress test for kill -s SIG[NAME] (now failing)Jeremie Courreges-Anglas
Prodded by anton@
2018-09-29test that PWD and OLDPWD are exportedanton
2018-07-09Add a test related to variable expansion that used to trigger the segfault seenanton
in the installer. from tb@
2018-07-08Add test covering variable expansion referencing multiple read-only variables.anton
2018-04-24Add test for proper stack reallocation in time commandkn
OK jca
2018-04-09Support 64 bit integers on 32 bit architectures.Tobias Stoeckmann
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
2018-01-12Fix tyopsJeremie Courreges-Anglas
2018-01-12Add tests for [[:foo:]] character classes in globsJeremie Courreges-Anglas
2018-01-12Add basic tests for octal and hex notation in arithmetic expansionsJeremie Courreges-Anglas
POSIX requires only decimal, octal and hex, tests for the $((x#number)) notation could be useful too.
2017-11-21Add tests for emacs editing mode in ksh. While here, improve the output on testanton
failure.
2017-11-21Do not exit 0 if the program was terminated due to receipt of a signal otheranton
than SIGHUP.
2017-10-23Add tests for history load from file.anton
2017-10-23Run all ksh tests with MALLOC_OPTIONS=Santon
2017-08-31Add HISTCONTROL tests.anton
2017-08-22Make the edit regress tests respect the KSH variable just like the main regressanton
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
2017-07-22Add missing RCS IDs and zap redundant SRCS from Makefile.anton
2017-07-19The first version of the edit program used to test csh, ksh and mail was basedanton
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@
2017-07-06anton@ has fixed the test script so that it can run as root. RemoveAlexander Bluhm
my workaround that switched to build user.
2017-07-05Favor a UID-agnostic prompt in ksh edit mode tests. Allows the tests to passanton
when executed as root. Spotted by bluhm@
2017-07-05Revert previously added tests for file completion that are currently failing.anton
Prodded by bluhm@
2017-07-05Add tests for file completion in ksh emacs mode, currently failing.anton
While here, pass the v option to hexdump in order to output all data.
2017-07-04Switch to build user if run as root. Prompt output $ or # affects test.Alexander Bluhm
2017-07-04Backout previous due to a bug discovered by zhuk@ that requires some tinkeringanton
and is not an easy fix for now.
2017-07-04Add support for pattern substitution to variables in ksh using a common syntaxanton
borrowed from ksh93. Survived a ports build performed by naddy@ and encouraged by many.
2017-06-25Capture SIGINT and print out all received output so far. Useful when debugginganton
broken tests.
2017-06-20Fix EOL tests for ksh vi mode.anton
2017-06-18Don't write input if ICANON is enabled. Also, write one byte at a time.anton
2017-06-17Pass the command to execute as an argument. Allows the edit program to beanton
reused.
2017-06-06Test insertion of unmatched meta sequence.anton
2017-06-05Test insertion of non-ASCII characters, in particular making sureIngo Schwarze
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.
2017-06-05Add new edit regress files.anton
Absent from my previous commit.
2017-06-05Rewrite ksh edit mode regression tests.anton
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@
2017-05-31Allow replacement of UTF-8 characters in vi mode.anton
Reported by Walter Alejandro Iglesias on tech@. ok schwarze@ tb@
2017-05-28Fix cursor position while removing characters from the command line.anton
While here, remove a condition that becomes redundant. ok schwarze@ tb@
2017-02-25Add missing includes to avoid implicit function declarations.Jonathan Gray
2016-12-11Remove and-list-error-3 test, it is obsoleted by seterror-11Todd C. Miller
2016-12-11Fixes descriptions for seterror tests 1, 2 and 4.Todd C. Miller
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