CVS commit: src/tests/bin/sh

2014-09-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Thu Sep 11 18:25:30 UTC 2014

Modified Files:
src/tests/bin/sh: Makefile

Log Message:
Visit the Bureau of Redundancy Department.
>From Henning Petersen in PR 49191.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-05-27 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat May 27 13:11:50 UTC 2017

Modified Files:
src/tests/bin/sh: t_redircloexec.sh

Log Message:
Skip the test of non-posix behaviour if we are deliberately trying
to be posix compatible (POSIXLY_CORRECT is set).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_redircloexec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-05-29 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May 29 22:27:47 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add a new test case wrap_strip based upon strip (ie: cut&paste.. to start)
but with \ newline line continuations inserted at strange places.

For the shell as it is today, since strip passes, wrap_strip should
automaticallty pass as well (and does), as the \ newline combination
is simply removed, producing identical input to that of strip.

However, for accurate line counting ($LINENO: coming soon) newlines (no
matter the context) cannot simply "go away" - we have to know where they
occur(ed) (perhaps long after the text was read)  so we know what line
number we are actually processing.   This new test case is (perhaps just
part) of future-proofing that the modified code does not break anything.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun  2 01:38:45 UTC 2017

Modified Files:
src/tests/bin/sh: t_option.sh

Log Message:
Guard against EVN being set, and possibly referencing an unset
variable, when we are running tests with sh -u


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun  2 01:45:06 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
One more weird test of parsing (and correctly understanding) words
whose meaning is defined entirely by context.

For those who read commit messages, and want a (small) challenge,
work out where (and what) to insert as punctuation/operator chars
in the following to produce 3 ines of output, and what those will be:

for in in in do in do case in in in echo do do echo in esac done

(There are no comments, quotes of any kind, or any kind of sub-shell,
including cmd substitutions)  With correct non alpha-numeric chars added,
it works.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun  2 01:48:13 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add 3 new subtests to the shell_params test case.   These test currently
broken behaviour (so for now, 3 of 15 subtests will fail).   This will
be corrected later today.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-01 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun  2 01:50:48 UTC 2017

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Add a new test case "nested_arith" (that is, things like $(( 1 + $(( 2 )) ))
which will currently fail (some of the sub-tests, but this one stops on
first failure, so the test simply fails.)  This will be corrected later today.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun  3 10:27:05 UTC 2017

Modified Files:
src/tests/bin/sh: t_fsplit.sh

Log Message:
Add some extra sub-tests checking splitting of ${#var} - just for my
piece of mind (to verify I was not breaking anything here.)

Also added some commentary better explaining why one of the tests of splitting
quoted variable expansions is almost certainly incorrect (both the tests,
and what sh does) ... though bash does the same as us, so all is not lost!


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_fsplit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun  3 11:23:01 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
By special request, add a check that ${011} is ${11} not ${9} (etc) and
that ${08} is not an error.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun  3 14:45:59 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Complete the special request by quoting chapter & verse from POSIX
as to why ${011} is ${11} and not ${9} (that is, why we interpret it
that way, the "why could it not be the other way?" is just "because
that is not how it was ever implemented".


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-03 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun  3 15:15:49 UTC 2017

Modified Files:
src/tests/bin/sh: t_fsplit.sh

Log Message:
Paranoia:   add a new test case testing that $(( )) results get split
by IFS just the same as any other expansion (split when they should be,
and not when they shouldn't).

Good thing I did ... this discovered a regression in the new expand
code (from an hour or three ago) where quoted arith expansions are
being split, and shouldn't be.  (on the other hand, when they should
be split, they are being split correctly, so that's good...)

No need to worry too much about this, in real life (as opposed to
torture tests) no-one ever puts digits in IFS, and a $(( )) expansion
only ever contains digits, so in practice, splitting never happens,
whether because it is quoted, or just becaue there is nothing to split.

The FreeBSD shell does it correctly (they do word splitting using a
totally different mechanism than we do) - I will find where I missed
testing for quoted expansions later tonight.  Until that happens,
expect a test failure from t_fsplit:split_arith

While here add more comments in the other test casess (one had a comment
already) that our shell parses incorrectly (this is a parsing problem,
not an expansion problem, and the bug has existed forever .. and is
shared by bash).

That is, in an expression like "${var:-word}" the whole thing (including
word) is quoted by the double quotes, and in "${var:-"word"}" the
expansion is quoted, but 'word' is not, the 2nd " (the one before 'w')
ends the opening quote, and the third (before }) turns quoting on
again (it is required that there be an even number of unquoted quotes inside
a ${} expression, so things like "${var:-"word} are simply invalid.)
Another way of saying this, is that if the { is quoted (for which the
only way is using " to get to this kind of expansion at all) the }
must also be quoted (" quoted).  There is no quote nesting here.

This also means that in "${var:-'word'}" the single quotes are just
characters, they are quoted by the "" that surround them, just as in
"a 'string' containing quotes", but "${var:-"'word'"}} is valid and
contains a single quoted word.

Note that this is different than the patetrn-match/trim expansions
( ${var%pattern} etc) where any surrounding quotes do not affect the
pattern, and all forms of quoting can be used in it - but it always
parses as a pattern, and is never subject to filename expansion, so
a '*' in it that is to mean "match any string" does not need special
quoting to avoid it expanding to file names, regardless of whether
the ${var%*} is quoted or not, but a * that is to be matched as a
character literally does need to be quoted.

I will probably file a PR about this bug sometime, but as it is
very old, and doesn't every seem to bother anyone (and is shared by
bash) there isn't any big hurry to open yet another verry messy can
of excrement to fix it...

This does mean that the FreeBSD shell "fails" some of our tests.
(The test is wrong, their shell is correct.)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_fsplit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun  9 23:49:58 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Add two new sub-tests to the c_line_wrapping test case.

These should detect if the errors that caused MAKDEV to fail and
pkgsrc/pkgtools/cwrappers to fail to build (problem detected in
libnbcompat/configure) ever return.

Also fixed one of the other sub-tests so that it actually does what
it should - no idea how this one has been passing, it did not for me
when I was checking the new ones (but perhaps in the interim I have
fixed something else in sh, the problem was in the area I have been
playing, and I originally debugged the new tests using a newer version
of /bin/sh than has yet been committed.)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun 16 07:30:32 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Fix a really stupid typo/thinko that was preventing many of the
redirect syntax sub-tests from being attempted.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jun 16 07:37:41 UTC 2017

Modified Files:
src/tests/bin/sh: t_cmdsub.sh

Log Message:
Add a new test to verify correct operation when a command substitution
produces output with a very large number of consecutive embegged \n
characters.

This test is currently expected to fail (as of commit date) but is not
marked as atf_expect_fail as the shell should be fixed to avoid the
problem quite soon.   Until then almost anything might happen to the
sh that runs this test (from just plain wrong results, to core dumps,
even possibly the right results, though that's unlikely).

Whie doing this, get rid of the duplicate implementation of the
nested_cmdsubs_in_heredoc test (which was achieving nothing).  I know
how I managed to do that, but on advice of counsel, I ...   (it was
just a harmless waste of a tiny amount of CPU time "compiling" the test,
just like writing "x=0;" on consecutive lines)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_cmdsub.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun 24 11:06:17 UTC 2017

Modified Files:
src/tests/bin/sh: t_fsplit.sh

Log Message:
NFC:   Added some comments (about other comments)

We currently parse var expansions like "${x-"a b c"}" incorrectly
according to POSIX (and ancient tradition) though in a way that is
generally unexpcted (there are 2 quoted strings there, according
to the standard, "${x-" and "}" and 'a b c' is unquoted.)  This has
never been fixed in our sh, as like in many other shells, it is just
a little unbelievable, most people expect that inside the {} is a
whole new ballpark, and everything starts again, and it does in cases
like "${x%"a b c"}" (the newer matching operators.)  There have been
comments in this test explaining how the test is actually testing for
incorrect behaviour for a while now.

But I have since learned of POSIX bug #221 (2010), the resolution of which is
to make the problem case unspecified.  This will not actually become part
of posix until the next major version (POSIX 8) whenever that appears (still
years away I expect) - but at least we now can feel happier about the
way our code works and not worry quite so much about testing that incorrect
code keeps working incorrectly


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_fsplit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-06-24 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jun 24 11:09:42 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Give this test a promotion!   This was the test that enabled the sh's
STACKSTRNUL() bug to eventually be found.   Not any of the test cases
directly - the shell running the tests (the same /bin/sh) managed to
build one of the f_variable_syntax sub-tests incorrectly, and that was
enough to eventually allow the bug to be located and squashed.

Like all good promotions, this one comes with increased work, and no extra pay.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-07-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jul 15 18:50:42 UTC 2017

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Add basic tests for the forthcoming ',' '++' and '--' operators.
Until the support for those is committed to /bin/sh (and when testing
any other sh that does not support them) the new tests will be skipped.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-07-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Jul 15 18:52:21 UTC 2017

Modified Files:
src/tests/bin/sh: t_option.sh

Log Message:
Add some tests for the (likely forthcoming) pipefail option (modelled
after than in ksh and bash, and the similar thing in zsh) for which a
request has been made for support in the NetBSD sh.

Until the support is committed, the test will be skipped.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-07-26 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jul 26 17:50:21 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
PR bin/48498   PR bin/52426

Add two new sh syntax test cases to check for bug fixes for the parser
problems (syntax errors unidentified) reported in the two PRs.

In the latter case, also include some tests that test similar
looking, valid, syntax - to make sure the fix for the PR does not
break code that should not fail.  This is not needed for the earlier
PR as other tests, and just normal parsing, is sufficient.

These tests have been verified to fail with a current /bin/sh and to
pass with the sh updates that are to be committed soon -- and because that
fix is expected within hours, the tests are not marked as expected to
fail, just let them actually fail for now.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-08-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Aug 18 21:22:30 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Add a basic test for $'...' quoting (roughly C ctyle strings).
This test will be skipped on shells (such as /bin/sh in -current as of
the date of this commit) which do not support $'...'

While here fix a typo in a comment (there are probably more...)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-08-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug 19 21:18:47 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Add a few more sub-tests to the $'...' syntax tests.
Remove dome debug noise accidentally left in when the test was first added.
(This still does not matter just yet, but should do soon.)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-08-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Aug 21 00:56:22 UTC 2017

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Make the $'...' syntax tests test what is supposed to work, rather than
what I thought was required (just a couple of changes...).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-10-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Oct  6 17:05:05 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add a new sub-test to validate ~ expansions.

Currently testing ~user is too much effort to contemplate (other than
assuming that it works in order to verify that it works...) so only bare ~
is being tested for now.   Maybe someday...

Right now (@ time of commit), this new test is expected to fail, as ~
expansions are horribly badly broken (have been for months, some forms
for much longer) in all but the simplest of uses.   Fix for that coming
very soon.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-11-16 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu Nov 16 19:41:42 UTC 2017

Modified Files:
src/tests/bin/sh: t_option.sh

Log Message:
Add a test case for "set -X".

Currently (or when testing any shell that does not support -X) the
test will be skipped (also for [m]ksh (but not ksh93 etc) where there
is an absurdly badly named -X option, skip the new test for them as well.)

When -X appears in /bin/sh, this will verify that it is probably working
(the test is MUCH more gruelling than any rational use of -X would be.)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-04-21 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr 21 21:28:35 UTC 2018

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add a test case for PR bin/53201

Currently this test case will fail, a fix is coming soon (not worth
marking this as an expected failure.)

This test case and the initial bug report comes from
Martijn Dekker's modernish (shell/test set).


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2014-05-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat May 31 14:29:06 UTC 2014

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh/dotcmd: Makefile scoped_command t_dotcmd.sh
src/tests/bin/sh/dotcmd/out: case_break_case.out
case_break_compound.out case_break_file.out case_break_for.out
case_break_func.out case_break_subshell.out case_break_until.out
case_break_while.out case_continue_case.out
case_continue_compound.out case_continue_file.out
case_continue_for.out case_continue_func.out
case_continue_subshell.out case_continue_until.out
case_continue_while.out case_return_case.out
case_return_compound.out case_return_file.out case_return_for.out
case_return_func.out case_return_subshell.out case_return_until.out
case_return_while.out compound_break_case.out
compound_break_compound.out compound_break_file.out
compound_break_for.out compound_break_func.out
compound_break_subshell.out compound_break_until.out
compound_break_while.out compound_continue_case.out
compound_continue_compound.out compound_continue_file.out
compound_continue_for.out compound_continue_func.out
compound_continue_subshell.out compound_continue_until.out
compound_continue_while.out compound_return_case.out
compound_return_compound.out compound_return_file.out
compound_return_for.out compound_return_func.out
compound_return_subshell.out compound_return_until.out
compound_return_while.out file_break_case.out
file_break_compound.out file_break_file.out file_break_for.out
file_break_func.out file_break_subshell.out file_break_until.out
file_break_while.out file_continue_case.out
file_continue_compound.out file_continue_file.out
file_continue_for.out file_continue_func.out
file_continue_subshell.out file_continue_until.out
file_continue_while.out file_return_case.out
file_return_compound.out file_return_file.out file_return_for.out
file_return_func.out file_return_subshell.out file_return_until.out
file_return_while.out for_break_case.out for_break_compound.out
for_break_file.out for_break_for.out for_break_func.out
for_break_subshell.out for_break_until.out for_break_while.out
for_continue_case.out for_continue_compound.out
for_continue_file.out for_continue_for.out for_continue_func.out
for_continue_subshell.out for_continue_until.out
for_continue_while.out for_return_case.out for_return_compound.out
for_return_file.out for_return_for.out for_return_func.out
for_return_subshell.out for_return_until.out for_return_while.out
func_break_case.out func_break_compound.out func_break_file.out
func_break_for.out func_break_func.out func_break_subshell.out
func_break_until.out func_break_while.out func_continue_case.out
func_continue_compound.out func_continue_file.out
func_continue_for.out func_continue_func.out
func_continue_subshell.out func_continue_until.out
func_continue_while.out func_return_case.out
func_return_compound.out func_return_file.out func_return_for.out
func_return_func.out func_return_subshell.out func_return_until.out
func_return_while.out subshell_break_case.out
subshell_break_compound.out subshell_break_file.out
subshell_break_for.out subshell_break_func.out
subshell_break_subshell.out subshell_break_until.out
subshell_break_while.out subshell_continue_case.out
subshell_continue_compound.out subshell_continue_file.out
subshell_continue_for.out subshell_continue_func.out
subshell_continue_subshell.out subshell_continue_until.out
subshell_continue_while.out subshell_return_case.out
subshell_return_compound.out subshell_return_file.out
subshell_return_for.out subshell_return_func.out
subshell_return_subshell.out subshell_return_until.out
subshell_return_while.out until_break_case.out
until_break_compound.out until_break_file.out until_break_for.out
until_break_func.out until_break_subshell.out until_break_until.out
until_break_while.out until_continue_case.out
until_continue_compound.out until_continue_file.out
until_continue_for.out until_continue_func.out
until_continue_subshell.out until_continue_until.out
until_continue_while.out until_return_case.out
until_return_compound.out until_return_file.out
until_return_for.out until_return_fu

CVS commit: src/tests/bin/sh

2021-05-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue May 18 21:37:56 UTC 2021

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add two new sub-tests to the echo test case of the t_builtins shell ATF test.

The first verifies that echo exits >0 when it encounters an I/O error on
its output (this part would have succeeded for a long time).  It also
verifies the POSIX requirement that when most standard utilities (or
perhaps many rather than most) exit(>0) they must write a message to stderr.
Our sh's built in echo did not do that (nor does /bin/echo but that's not
relevant here).

The second demonstrates (on an unfixed built-in echo) a bug reported in
private e-mail by Oguz  where once an instance of
the built-in echo has detected an I/O error, all later invocations of
the built-in echo, with no I/O errors of their own, also exit(1) (the error
status on stdout is not cleared, each echo sees the "I/O error occurred" and
does exit(1)).

In this second sub-test, the "2>&-" on the first echo command is simply
an artifact caused by the test harness - the "check" function verifies
that exit((>0) requires a message on stderr (and vice versa), but that
only applies to most (or many) utilities, echo is one, but sh is not.
In the second test, the exit status comes from sh - sh is permitted to
write to stderr (via the echo command it runs in this case) and still
exit(0).   But the check function in the test does not understand that
subtlety.   So, we simply suppress the stderr message by closing stderr
(the first of these two new sub-tests has verified that the message exists)..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_builtins.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2021-05-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 19 22:43:18 UTC 2021

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Handle the (very) recent change to printf(1) - when writing to a closed
stdout printf(1) now issues an error message, hence stderr in such cases
should not be empty, rather than should be empty.   Adapt to that.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2015-08-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Aug 23 07:15:16 UTC 2015

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
another wait test.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2015-09-29 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Sep 30 06:08:36 UTC 2015

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
Add delay to improve stability of test


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2015-12-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 30 22:24:44 UTC 2015

Modified Files:
src/tests/bin/sh: t_ulimit.sh

Log Message:
more robust ulimit test that works with most variants of bourne shells.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_ulimit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 13:48:28 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh t_varquote.sh

Log Message:
Add a test for PR/50827


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_expand.sh \
src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 19 13:49:01 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
undo accidental commit


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 22 19:52:03 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Add new test


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 22 20:02:30 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
PR/43469 has been fixed


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 23 14:21:37 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Add new redirection test, from kre


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 23 16:20:42 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_option.sh

Log Message:
Add t_option, from kre (with minor edits from me)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 24 14:42:06 UTC 2016

Modified Files:
src/tests/bin/sh: t_exit.sh t_wait.sh

Log Message:
Test improvements from kre


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_exit.sh \
src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Feb 24 14:42:50 UTC 2016

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
uncomment clean up


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-02-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Feb 29 23:52:53 UTC 2016

Modified Files:
src/tests/bin/sh: t_here.sh

Log Message:
more tests from kre


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_here.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  1 12:39:36 UTC 2016

Modified Files:
src/tests/bin/sh: t_exit.sh t_here.sh t_option.sh t_redir.sh

Log Message:
Improved handling of TEST_SH so that it is possible to define it
to the name of a shell, plus options that shell needs to run it
in the correct mode to be tested: eg: TEST_SH='bash -o posix'
Also finished the implementation of tests of "set -n" now that
the NetBSD shell supports that as it should. (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_exit.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_here.sh \
src/tests/bin/sh/t_redir.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:19:28 UTC 2016

Modified Files:
src/tests/bin/sh: t_option.sh

Log Message:
Correct the way that TEST_SH is used so that the tests work as
intended when TEST_SH is specifies a shell that needs options (like
sh -F, or bash -o posix). (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_option.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:20:22 UTC 2016

Modified Files:
src/tests/bin/sh: t_set_e.sh

Log Message:
Correct one test that (while OK for NetBSD) insisted on behaviour
that is not required by the standard. The test now allows either
of the two allowed responses. Also add commentary correcting
erroneous comments about what is correct, and incorrect. (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_set_e.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:21:02 UTC 2016

Modified Files:
src/tests/bin/sh: t_here.sh

Log Message:
Cleanup left over (dead) debugging code (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_here.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:24:06 UTC 2016

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
Complete implementation of TEST_SH, use builting kill (which does
work, now anyway) rather than working around a defect by using
/bin/kill (if the shell is broken, the test should fail, not succeed)
and test more aspects of the wait builtin in the kill test. (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:24:50 UTC 2016

Removed Files:
src/tests/bin/sh: t_compexit.sh

Log Message:
This test tests nothing not tested elsewhere, and doesn't
do a very good job of that. Bang! (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/tests/bin/sh/t_compexit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:26:26 UTC 2016

Added Files:
src/tests/bin/sh: t_shift.sh

Log Message:
Tests for the shift builtin (from kre)


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_shift.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:26:34 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile

Log Message:
remove old test


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Mar  8 14:26:54 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh t_fsplit.sh t_redir.sh

Log Message:
Added more test cases, more exhaustive testing. (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_expand.sh
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_fsplit.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 10 22:30:57 UTC 2016

Modified Files:
src/tests/bin/sh: t_fsplit.sh

Log Message:
Set TEST_SH


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_fsplit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Mar 12 14:58:03 UTC 2016

Modified Files:
src/tests/bin/sh: t_varquote.sh

Log Message:
Implement TEST_SH for this test, add a test or two, and also some
commentary to explain some of the weirdness of shell quoting. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-13 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 13 18:55:12 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_redircloexec.sh

Log Message:
Add some redir-close-on-exec tests


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_redircloexec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 16 17:39:12 UTC 2016

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
remove binary test and other cleanups (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 16 21:13:51 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile t_redircloexec.sh

Log Message:
Better tests for redircloexec and add t_shift (from kre)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/bin/sh/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_redircloexec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 16 15:49:20 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_arith.sh t_varval.sh

Log Message:
New tests from kre


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_arith.sh \
src/tests/bin/sh/t_varval.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 20 22:57:04 UTC 2016

Modified Files:
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_cmdsub.sh

Log Message:
new command substitution test from kre


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_cmdsub.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 27 14:49:07 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Avoid relying on the test shell correctly implementing $(( ))
in order for some of the redirect tests to terminate. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 27 14:50:01 UTC 2016

Modified Files:
src/tests/bin/sh: t_evaltested.sh t_fsplit.sh t_set_e.sh t_ulimit.sh
t_varquote.sh

Log Message:
Finish TEST_SH - all tests should support it now.
Misc other KNF changes, minor bug fixes, and a few minor
extra tests added. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_evaltested.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_fsplit.sh
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_set_e.sh \
src/tests/bin/sh/t_ulimit.sh
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 27 14:50:40 UTC 2016

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
More tests, add protection against shells that allow wait N
to wait for the same process over and over again (forever) (???)
This test now takes slightly over 20 seconds to complete (elapsed
time) caused by all the waiting on sleep commands being run in
the background. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 27 14:52:40 UTC 2016

Modified Files:
src/tests/bin/sh: t_here.sh

Log Message:
PR bin/50993 - lots of new here document tests to validate all of
the changes made to fix that PR.   LOTS more tests...  A few general
improvements to the way the tests work and results are reported
as well. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_here.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 27 14:53:17 UTC 2016

Modified Files:
src/tests/bin/sh: t_cmdsub.sh

Log Message:
Finish these tests (or at least, fill in the place holder tests
with actual code ... tests are never really finished.)  One of these
new tests was how the bug in PR bin/50993 was discovered. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_cmdsub.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:19:52 UTC 2016

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Don't confuse more capable shells by writing operator combinations
that could be interpreted as something different. That is, for our
shell +4++3 is just (+4)+(+3) and works fine. But others treat ++
as the increment operator.  Same for --. Sprinkle spaces to taste.
(from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:20:40 UTC 2016

Modified Files:
src/tests/bin/sh: t_cmdsub.sh

Log Message:
Added tests collected by Sven Mascheck
http://www.in-ulm.de/~mascheck/various/cmd-subst/
which test cases of ')' being embedded in command substitutions.
(from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_cmdsub.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:21:10 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
PR bin/51027 - tests for shell positional parameters, including
testing that $10 is correctly parsed as ${1}0 and not as ${10}.
More than that though. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:21:52 UTC 2016

Modified Files:
src/tests/bin/sh: t_here.sh

Log Message:
Added lots more end delimiter tests (some weird cases...). Also
use printf %s instead of echo, as there are embedded \ chars in
some of the strings, and some other (nameless) shells insist on
treating \ in the args to echo as something special... (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_here.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:22:28 UTC 2016

Modified Files:
src/tests/bin/sh: t_set_e.sh

Log Message:
When embedding a command in a subshell "( ... )" avoid accidentally
producing (( (when the cmd starts with a '(' as that as a reserved
sequence (according to posix) and some shells do treat it specially.
So, force a space after the enclosing '(' to avoid the problem.
For symmetry, put a space before the concluding ')' as well, though
there is nothing special about )). (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_set_e.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-03-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Mar 31 16:22:54 UTC 2016

Modified Files:
src/tests/bin/sh: t_wait.sh

Log Message:
Avoid leaving turds in /tmp. (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/t_wait.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-04-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr  4 12:40:13 UTC 2016

Modified Files:
src/tests/bin/sh: t_cmdsub.sh

Log Message:
Add a test case for here documents positioned outside `` with the
redirect operator inside the ``.   Move the one similar test using
$( ) into its own test case (and expand that test as well.
The `` case was omitted before, as no shells (including NetBSD) were
parsing it correctly,  Now the NetBSD shell does, so ... (from kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_cmdsub.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-04-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 29 18:29:17 UTC 2016

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
use "" so ${TEST_SH} is expanded.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-01 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon May  2 01:47:14 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
More redirect tests, in particular, tests for redirects to/from
file descriptors outside the 0..9 range, and complex fd
reassignments.  Also test that the shell can cope with the
value of ulimit -n changing (downwards, up is harmless)
(Freom kre@)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-07 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat May  7 23:51:30 UTC 2016

Modified Files:
src/tests/bin/sh: t_exit.sh

Log Message:
Remove the trap_zero__explicit_return test case - it was testing undefined
behaviour (and failed with the NetBSD shell, and was marked as expected to
fail.)   Other shells do different things.   The test was worthless, and is
now gone.

OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_exit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May  9 22:34:37 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
PR bin/48875   PR bin/51123This adds tests more that verify fide descriptor
redirection works correctly (including that the bugs reported in those PRs
are fixed.)  Note that the tests for 48875 are slow, so one of the new
test cases ends up running > 25 seconds (just doing sleeps) - each individual
test is just a few seconds, but there are several of them.

OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed May 11 17:43:17 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Add a test for fd redirections on functions in loops (the etcupdate issue)
and also fix a quoting bug which was causing a test to fail, though
ATF was ignoring (an ATF bug to be investigated later.)

OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 12 13:34:23 UTC 2016

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Verify that questionable characters don't have bad associates.

ok christos@


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Thu May 12 14:25:11 UTC 2016

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Grunge.  I know I fixed this typo before...  must have been in a different
couy of the test.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat May 14 00:33:02 UTC 2016

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Add another test for the 48875 fix fallout...


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun May 15 15:44:43 UTC 2016

Modified Files:
src/tests/bin/sh: t_redircloexec.sh

Log Message:
Add a new test case to validate N>&N redirect disables close-on-exec.
OK christos@


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_redircloexec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2016-05-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue May 17 09:05:15 UTC 2016

Modified Files:
src/tests/bin/sh: t_shift.sh

Log Message:
Use valid (standard) shell syntax, in anticipation of /bin/sh enforcing
it sometime soon (perhaps.)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_shift.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-03-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Mar 12 00:39:47 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add new test case in to check (coming) bug fix for newly discovered
ash based shell bug
echo ${unset_var##$(echo a)}$(echo b)
should say "b" but instead says "a" ... the first "echo a" is not
evaluated because it cannot possibly match an unset variable, but is
not removed from the list of command substitutions, when the shell
needs to execute the 2nd cmdsub, "echo b" should be at the head of
the list, but isn't, "echo a" is still there...

This test should fail (for now) - should show 4 of 40 subtests failing.
It isn't marked as atf_expect_fail as the fix for this will be coming
later today (I will just wait at least 1 b5 build cycle so the failure
can be observed).

Detecting the bug, and the fix, are from FreeBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-03-19 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Mar 19 20:29:30 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
PR bin/52090

Add 5 new test cases to test various ways that $* can be expanded.
Currently 3 of the 5 are marked as "expected to fail" because of the
bug in this PR.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-03-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar 20 11:32:51 UTC 2017

Modified Files:
src/tests/bin/sh: t_arith.sh

Log Message:
Add tests for the $(( )) assignment operators  PR bin/50958


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/bin/sh/t_arith.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-03-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Mar 20 11:48:41 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
PR bin/52090 - the $* tests are no longer expected to fail.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-05-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun May 14 11:28:49 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add a test case for the various ways that ${xxx} expansions, which
contain a # character, can get parsed (which amounts to 86 extra checks,
any Australian can tell you why I decided to stop there and not add one
more...)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-05-14 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun May 14 17:28:46 UTC 2017

Modified Files:
src/tests/bin/sh: t_redircloexec.sh

Log Message:
Add a test for opening files with exec "when" in posix mode (close-on-exec
should not get set.)  While here, remove the (unused) runhelper() function.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_redircloexec.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2017-05-15 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon May 15 19:53:40 UTC 2017

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
More test sub-cases for the dollar_hash ( ${#...} ) test.
Upi really (really!) don't want to know!

Also, add a comment (in another section) and avoid giving messages
to atf_fail that include newlines - AFT really doesn't like that.
Instead, convert the \n's to ;'s so at least the content is retained.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2012-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 25 17:30:59 UTC 2012

Modified Files:
src/tests/bin/sh: t_exit.sh

Log Message:
ksh trap has been fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_exit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2012-03-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 25 18:50:19 UTC 2012

Modified Files:
src/tests/bin/sh: t_varquote.sh

Log Message:
PR/43597 was fixed


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_varquote.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2012-04-12 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Fri Apr 13 06:12:32 UTC 2012

Modified Files:
src/tests/bin/sh: t_exit.sh

Log Message:
Although this does not fail, add a case for the discussion in PR bin/46327.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_exit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-07-20 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Jul 20 18:25:56 UTC 2018

Modified Files:
src/tests/bin/sh: t_patterns.sh

Log Message:
Several improvements to this test...

In the filename expansion test, don't insist on testing cases
of [^a] anything not an a) (etc) - while almost all shells allow
^ there (as in regular expressions) this is not standard sh/glob syntax
(! is used for that, not ^).  Use of ^ as first char after '[' in a []
match has unspecified behaviour.   So, check if the shell being
tested supports ^ used this way before running the tests of ^ in [].
This makes no difference at all when testing the NetBSD sh which
does allow ^ for that use case.

Fix an obvious (in hindsight) stupidity in the case pattern tests
(a cut/paste/forget-to-fix type error).

Many cleanups, including some additional sub-tests, for the var
substring matching (just a couple of actual fixes to the tests).
(This was the last added, and least polished part - still is.)

This makes no difference to the filename expansion tests (11 of 167
still fail), the fix reduces the failing case match tests from
14 of 261 to 13 of 261.   For var substring tests, the failure
has changed from 6 of 87 to 8 of 99.   (Some) Fixes to sh will appear
soon.

For comparison, using this version of the test, dash passes all case
and var substring tests, and (aside from the [^...] tests which it
does not implement) fails 4 of the filename tests.   bash fails one
case test (a bash oddity in interpretation of the spec, which is unique
to bash amongst shells I have tested)  and one filename expansion (all
var substring tests pass).  Other shells are much worse (though the
freebsd shell results were coloured by the version of their shell I
tested still having the [[:xxx:]] always matches '[' bug, which is
fixed in later versions of their shell)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_patterns.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-11-13 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Nov 14 02:37:51 UTC 2018

Modified Files:
src/tests/bin/sh: t_syntax.sh

Log Message:
Add a test for the bug in PR bin/53712   ( " { } > out " core dump )
Tested with both fixed, and unfixed, versions of /bin/sh (and in
posix mode, where that is a syntax error).


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/bin/sh/t_syntax.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-11-17 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Nov 18 01:24:44 UTC 2018

Modified Files:
src/tests/bin/sh: t_patterns.sh

Log Message:
Add some tests to detect the presence of a bug in sh reported by
Martijn Dekker (private e-mail.)   Variable expansions that are
double quoted result in literal characters (nver pattern matching
meta chars.)  This includes '\' (that one was the bug.)
[On the other hand, a variable in a case pattern expansion that is
unquoted, produces a pattern, and in that the \ character can be
used to excape other pattern meta-chars (and itself.]

This addition will cause the case_matching test case to fail (two
of the newly added sub-tests fail) until fixes to /bin/sh are made.
(That is comiung soon, the code exists already.)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_patterns.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-11-18 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Nov 18 13:41:24 UTC 2018

Modified Files:
src/tests/bin/sh: t_patterns.sh

Log Message:
It turns out there are more cases where escaping of meta-chars
was not being done properly (too many different code paths inside sh)
so add even more subtests to the case_matching test case to verify
that all (that I can think of for now anyway) get fixed when this
gets cleaned up.   The case_matching test case still fails, but now
6 of its subtests should fail (until sh is corrected ... soon).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_patterns.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-11-27 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Nov 27 09:55:32 UTC 2018

Modified Files:
src/tests/bin/sh: t_redir.sh

Log Message:
Add a new test case to test <> (open for input & output),
includion a test to make sure that the file doesn't get truncated.

Add new subtests to the "incorrect redirections" test case, to
validate correct behaviour of the shell when redirections fail in
various scenarios, including when the redirect is the whole command.

More along these lines are really needed, but this is better than nothing.

All the added tests pass on the /bin/sh currently in netbsd HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/tests/bin/sh/t_redir.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-11-27 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Nov 27 09:59:30 UTC 2018

Modified Files:
src/tests/bin/sh: t_expand.sh

Log Message:
Add two new test cases to add more tests for $@ expansions
(and a few more subtests in an existing test case).

The two new test cases currently fail, because of issues with
expanding "${1+$@}" which will (hopefully) be fixed soon.
(This looks to have been broken sometime during 2013 ... then I
made it even worse with some of the parser changes a while ago,
though the end result is that it appears less broken than it
really is.)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/tests/bin/sh/t_expand.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 02:48:05 UTC 2018

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Oops, this is 2018, not 2017 ... cut&paste  (affects just copyright notice)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_builtins.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-12-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec 12 08:10:39 UTC 2018

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add more subtests to the export and readonly built-in commands test cases.

In particular, add a readonly test to detect the bug that was just fixed...
(but there is more than that one added here).

Also, allow zsh to run more of these tests than it did, what is a builtin
command most places (including in POSIX) can be a reserved word in zsh!


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/t_builtins.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2018-12-12 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec 12 11:52:05 UTC 2018

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add a new test case for NetBSD specific readonly tests.
Add more sub-tests to the export_nbsd test case.
In both cases the new -q and -p VAR options are tested.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/bin/sh/t_builtins.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2019-01-09 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jan  9 10:51:24 UTC 2019

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add several sub-tests to the test for the "eval" builtin,
including testing correct handling of error cases.
One of these new tests located a bug which will be fixed
within minutes of this commit ...

While doing this, move the test that was used only in the
echo builtin test case (testing if the NetBSD shell was being
tested) into a utility function, and also call it in the eval
test, so NetBSD specific behaviour of what is unspecified in
the standard can be checked to ensure it is not accidentally
altered.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/bin/sh/t_builtins.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/tests/bin/sh

2019-01-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Jan 22 14:31:53 UTC 2019

Modified Files:
src/tests/bin/sh: t_here.sh

Log Message:
Add sub tests to the quoting test case, to demonstrate a parsing
bug (and its fix (depending upon whether the test is run against
an unfixed, or fixed, shell).

An obvious indication of the failure is the following (one of the
new sub-tests)

p=A
cat <

CVS commit: src/tests/bin/sh/dotcmd

2014-07-27 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sun Jul 27 14:24:17 UTC 2014

Modified Files:
src/tests/bin/sh/dotcmd: Makefile

Log Message:
Run scripts at build time via ${HOST_SH}


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/dotcmd/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



  1   2   >