History log of /netbsd-src/tests/bin/sh/t_syntax.sh (Results 1 – 13 of 13)
Revision Date Author Comments
# 79548a51 28-Dec-2023 andvar <andvar@NetBSD.org>

s/synax/syntax/ in test description.


# d4ae1f8b 22-Nov-2021 kre <kre@NetBSD.org>

More tests that were doing ... | atf_check ...

which allows the atf_check to fail without causing the test to fail
(unless this is the (very) last command in the test case, in which case it
will fa

More tests that were doing ... | atf_check ...

which allows the atf_check to fail without causing the test to fail
(unless this is the (very) last command in the test case, in which case it
will fail with what can be interpreted as an internal error)/

Check for this failing and explicitly atf_fail whwn it does.

show more ...


# b1f04c11 16-Nov-2021 kre <kre@NetBSD.org>

Correct a systematic atf_check usage error. One must not pipe into
atf_check and simply expect it to work - the shell is permitted to,
and our shell currently does, run all commands in a pipeline i

Correct a systematic atf_check usage error. One must not pipe into
atf_check and simply expect it to work - the shell is permitted to,
and our shell currently does, run all commands in a pipeline in subshell
environments - when atf_check attempts to exit to indicate failure, it
only exits from that subshell, and the rest of the test continues, usually
to indicate success

Instead, when it is necessary (or just convenient) to pipe into atf_check
check the exit status of the pipeline (if atf_check is not last, which it
would usually be, then we would need the pipefail option set - there are
currently no such cases), and explicitly fail if atf_check did not exit(0).

show more ...


# 0b70db4e 14-Nov-2018 kre <kre@NetBSD.org>

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).


# 5f02c8e9 21-Aug-2017 kre <kre@NetBSD.org>

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


# 9985dad5 19-Aug-2017 kre <kre@NetBSD.org>

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.)


# 327a7bf9 18-Aug-2017 kre <kre@NetBSD.org>

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

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...)

show more ...


# 21aab715 26-Jul-2017 kre <kre@NetBSD.org>

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 so

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.

show more ...


# 8b5ee9a5 24-Jun-2017 kre <kre@NetBSD.org>

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) m

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.

show more ...


# a2385816 16-Jun-2017 kre <kre@NetBSD.org>

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


# e045f926 09-Jun-2017 kre <kre@NetBSD.org>

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/c

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.)

show more ...


# 06627d31 02-Jun-2017 kre <kre@NetBSD.org>

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

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.

show more ...


# 79115595 20-May-2017 kre <kre@NetBSD.org>

Add a test of sh syntax & parsing (first attempt anyway.)