stefanf
e3acc4fb35
Add a test for r199631.
2009-11-21 14:54:35 +00:00
stefanf
a85bade2b1
Add a few very basic tests for cd -{L,P} and pwd -{L,P}.
2009-11-21 14:12:51 +00:00
jilles
6655f1214a
sh: Allow a newline before "in" in a for command, as required by POSIX.
2009-11-14 22:08:32 +00:00
jilles
ae4c008ec3
sh: Exempt $@ and $* from set -u
...
This seems more useful and will likely be in the next POSIX standard.
Also document more precisely in the man page what set -u does (note that
$@, $* and $! are the only special parameters that can ever be unset, all
the others are always set, although they may be empty).
2009-10-24 21:20:04 +00:00
jilles
78d7070a59
Add some tests for ${var?} and set -u.
2009-10-24 20:57:11 +00:00
jilles
fab15b104f
sh: Send the "xyz: not found" message to redirected fd 2.
...
This also fixes that trying to execute a non-regular file with a command
name without '/' returns 127 instead of 126.
The fix is rather simplistic: treat CMDUNKNOWN as if the command were found
as an external program. The resulting fork is a bit wasteful but executing
unknown commands should not be very frequent.
PR: bin/137659
2009-10-06 22:00:14 +00:00
jilles
a4d520ccb0
sh: Disallow mismatched quotes in backticks (...
).
...
Due to the amount of code removed by this, it seems that allowing unmatched
quotes was a deliberate imitation of System V sh and real ksh. Most other
shells do not allow unmatched quotes (e.g. bash, zsh, pdksh, NetBSD /bin/sh,
dash).
PR: bin/137657
2009-10-01 21:40:08 +00:00
jilles
0bf6e8da4e
sh: Fix crash with empty functions (f() { }) introduced in r196483
...
Empty pairs of braces are represented by a NULL node pointer, just like
empty lines at the top level.
Support for empty pairs of braces may be removed later. They make the code
more complex, have inconsistent behaviour (may or may not change $?), are
not specified by POSIX and are not allowed by some other shells like bash,
dash and ksh93.
Reported by: kan
2009-08-28 22:41:25 +00:00
jilles
6473998f11
Add some tests for a fixed bug in an uncommitted patch.
...
(Trying to get syntax errors for sh -c ':; do' and `:; do`.)
2009-08-27 22:23:23 +00:00
jilles
4a8e08a110
sh: Fix crash when undefining or redefining a currently executing function.
...
Add a reference count to function definitions.
Memory may leak if multiple SIGINTs arrive in interactive mode,
this will be fixed later by changing SIGINT handling.
PR: bin/137640
2009-08-23 21:09:46 +00:00
jilles
5ecfba6d0b
Add some tests for r194975 and r194977.
...
Approved by: ed (mentor) (implicit)
2009-06-25 17:36:08 +00:00
jilles
1f2b1b2840
Designate special builtins as such in command -V and type.
...
Also document various properties of special builtins that we implement.
Approved by: ed (mentor) (implicit)
2009-06-24 22:04:04 +00:00
jilles
1498b76770
Add test for r190698.
...
Submitted by: Eygene Ryabinkin
Approved by: ed (mentor) (implicit)
2009-06-24 20:22:54 +00:00
jilles
edb926b17d
Add tests for r194774.
...
Approved by: ed (mentor) (implicit)
2009-06-23 22:03:56 +00:00
jilles
4466baff5e
Add tests for r194406 and r194516.
...
Approved by: ed (mentor)
2009-06-19 22:15:59 +00:00
jilles
52854b093c
Add tests for r194127 and r194128.
...
Approved by: ed (mentor)
2009-06-14 16:21:51 +00:00
stefanf
3d7ca7e192
Add tests for r193169.
2009-05-31 17:23:27 +00:00
edwin
91a54071df
Add regression tests for the date(1) + argument for user-defined
...
format strings.
PR: bin/127514
Submitted by: edwin@
MFC after: 1 week
2009-05-20 22:01:43 +00:00
stefanf
e2e8e48cde
Add a test for r191009.
2009-04-13 19:12:28 +00:00
stefanf
106f32b27d
Test the r190298 change.
2009-03-22 23:00:52 +00:00
stefanf
79a3bf3a75
Add a few tests for the read built-in.
2009-03-22 22:14:46 +00:00
stefanf
39c3581548
Update test for r190284.
2009-03-22 21:12:00 +00:00
stefanf
62671f061c
Update and extend the tests for alias.
2009-03-22 17:22:14 +00:00
stefanf
278436b88e
Update for 185401, errors now go to stderr.
2008-11-28 18:59:04 +00:00
stefanf
465185b192
Add a test for r185231.
2008-11-23 20:27:03 +00:00
stefanf
f8e575b9ca
Add a test for r182300.
2008-08-27 20:26:34 +00:00
stefanf
96e2d91df4
Add a regression test for r181017.
...
Submitted by: simon
2008-07-30 21:18:52 +00:00
stefanf
1d02ed2942
Test the expansion of $LINENO.
2008-05-15 19:58:44 +00:00
stefanf
0f834356e3
Add a test case for options.c revision 1.26.
2008-03-22 14:07:49 +00:00
stefanf
966480ec8b
Add a regression test for cd.c's revision 1.35.
2008-02-24 16:52:02 +00:00
dds
33d15c75c6
Update the number of reported tests to keep prove(1) happy.
2007-12-19 11:52:33 +00:00
dds
551c1b0bf1
Correct the "move file from directory to existing directory" test for
...
cross-device moves.
2007-12-19 11:00:22 +00:00
dds
211284bdb0
Portability improvements to investigate behavior of other OSs.
...
Now works under Solaris and Linux.
2007-12-18 08:53:04 +00:00
dds
2d1dbd2a75
Add more tests. All rename(2)-based tests now succeed.
...
The performance of the cross-device equivalents is under investigation.
2007-12-18 08:49:47 +00:00
dds
073a04f869
Verify that the moved source is no longer there.
2007-12-16 08:25:34 +00:00
dds
9d79823938
Regression tests for upcoming makeup of mv.
...
Case 20 corresponds to PR bin/118367.
2007-12-16 08:11:38 +00:00
stefanf
7dc3b250aa
The exit status of a case statement where none of the patterns is matched
...
is supposed to be 0, not the status of the previous command.
Reported by: Eygene Ryabinkin
PR: 116559
Approved by: re (gnn)
2007-10-04 16:14:48 +00:00
stefanf
d7208a9c10
Add regression tests for exec.c rev 1.30.
2007-01-11 00:25:20 +00:00
stefanf
5d1b410c9d
Add regression tests for PR 105078.
2006-11-05 18:41:23 +00:00
stefanf
209025405d
Test that variable assignments preceding special built-ins affect the current
...
shell environment, eg after "VAR=val eval" VAR remains set. Currently fails
but will be implemented soon.
2006-04-09 09:38:29 +00:00
stefanf
11fa827525
Add test cases that check utility syntax errors and redirection errors. For
...
special built-in utilities they must terminate the shell, for other
utilities only a error message shall be written. We currently fail both
tests.
2006-04-02 19:02:49 +00:00
stefanf
8723c51d6b
Add test cases for the command built-in, including its -v and -V options which
...
I'll commit real soon.
Count the number of found test cases instead of hard-coding them. Allow an
arbitrary exit status.
2005-10-28 14:02:42 +00:00
stefanf
560cfe4de3
- Add tests for hash and return and more tests for set -e.
...
- Simplify regress.sh, sort tests.
2005-09-05 09:42:10 +00:00
stefanf
4a2e133e0f
Simplify and add PR 77067 which addresses the same bug.
2005-09-04 21:29:09 +00:00
stefanf
ea45d0596e
Fix syntax error that crept in somehow.
2005-09-04 18:12:21 +00:00
stefanf
ce5d9c9b6d
Add a couple of regression tests for /bin/sh.
2005-09-04 11:59:59 +00:00