summaryrefslogtreecommitdiffstats
path: root/bin/test
Commit message (Collapse)AuthorAgeFilesLines
* MFC r289488:ngie2015-10-261-9/+9
| | | | Clean up trailing whitespace
* MFC refactoring of the *.test.mk files.jmmv2014-04-141-1/+1
| | | | | | | | | - r263161 Make bsd.test.mk the only public mk fragment for the building of tests. - r263172 Move FreeBSD Test Suite-specific code to a suite.test.mk file. - r263204 Add some documentation for bsd.test.mk. - r263217 Document support for TAP-compliant Perl test programs. This is "make tinderbox" clean.
* Sync sh(1) in stable/10 to head.jmmv2014-03-093-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a MFC of all the commits listed below. My original goal of this change was to only merge the move of the tests from tools/regression/bin/ into the new layout (which include tests for sh(1) and other tools as well). However, doing so is tricky due to the ongoing work in sh(1) and, especially, the many changes to its tests since stable/10 was first branched. Merging everything is the simplest way to achieve this goal and, as a bonus point, we get various fixes and miscellaneous improvements into the branch. Per jilles' suggestion, I'm avoiding the merge of a couple of changes (r256850 and r257506) that required depending kernel changes. I'm also avoiding very recent changes that have not had a long enough time to be validated in current. This is "make tinderbox" clean. r256735 sh: Remove one syscall when waiting for a foreground job. r257399 sh: Allow trapping SIGINT/SIGQUIT after ignore because of '&'. r257504 sh: Reorder union node to reduce its size on 64-bit platforms. r257920 sh: Add a test case for would-be assignments that are not due to quoting. r257929 sh: Properly quote alias output from command -v. r258489 sh: Add tests for the </dev/null implicit in a background command. r258533 sh: Add more tests for the </dev/null implicit in a background command. r258535 sh: Make <&0 disable the </dev/null implicit in a background command. r258776 sh: Prefer memcpy() to strcpy() in most cases. Remove the scopy macro. r259047 sh: Split set -x output into a separate function. r259210 Migrate tools/regression/bin/ tests to the new layout. r259844 sh: Remove an unused variable. r259846 sh: Initialize OPTIND=1 even if it came from the environment. r259874 sh: Simplify code related to PPID variable. r259946 sh: Don't check input for non-whitespace if history is disabled. r260246 sh(1): Discourage use of -e. r260506 Run the sh(1) and test(1) tests as unprivileged. r260586 Mark the bin/pax tests as requiring perl. r260634 Use TAP_TESTS_PERL to register the legacy_test in bin/pax. r260635 Replace hand-crafted Kyuafiles with automatic generation. r260654 sh: Remove SIGWINCH handler and just check for resize before every read. r261121 sh: Add test for nested alias. r261125 sh: Solve the alias recursion problem in a less hackish way. r261141 sh: Do not depend on parse/execute split in new alias test. r261160 sh: Add tests for alias names after another alias. r261192 sh: Allow aliases to force alias substitution on the following word. r262533 sh: Make expari() static. r262565 sh: Do not corrupt internal representation if LINENO inner expansion fails. r262697 sh: Simplify expari(). Reviewed by: jilles
* test(1): Add information about replacing -nt/-ot.jilles2013-05-311-0/+16
|
* test(1): List non-standard primaries.jilles2013-05-311-1/+12
|
* test: Remove -ntXY and -otXY primaries.jilles2013-05-312-215/+27
| | | | | | | | | | | | | | | This reverts commit r247274. As maintainer of sh, I disapprove of this feature addition. It is too specific and can be done without easily using find(1) or stat(1). I will add some hints to the test(1) man page shortly. In general, FreeBSD sh is not the place to invent new shell language features. This is how it has been maintained and adding features randomly does not work with that. The new syntax (e.g. [ FILE1 -ntca FILE2 ]) looks cryptic to me.
* Enhance test(1) by adding provision to compare any combination of thepeterj2013-02-252-27/+215
| | | | | | | | | access, birth, change and modify times of two files, instead of only being able to compare modify times. The builtin test in sh(1) will automagically acquire the same expansion. Approved by: grog MFC after: 2 weeks
* test(1): Document == alias for =.jilles2012-12-271-1/+8
| | | | | | Reviewed by: gjb Requested by: gjb MFC after: 1 week
* Minor mdoc nits.joel2012-05-131-1/+1
|
* test: Reduce code size of ops table.jilles2011-11-251-5/+5
|
* Put some static keywords in the source code.ed2011-10-311-5/+5
| | | | | | For these simple utilities, it doesn't harm to make all global variables static. In fact, this allows the compiler to perform better forms of optimisation and analysis.
* bin: Prefer strrchr() to rindex().jilles2011-03-151-1/+1
| | | | This removes the last index/rindex usage from /bin.
* Accept == as an alias of = which is a popular GNU extension.delphij2011-02-271-0/+1
| | | | | | | This is intentionally undocumented for now since it's not part of any standard. MFC after: 1 month
* test: Note that this is used both as a normal program and a shell builtin.jilles2011-02-151-0/+4
| | | | MFC after: 1 week
* test: Move tests to tools/regression/bin/test.jilles2010-11-083-353/+0
| | | | | | | | | Convert the tests to the perl prove format. Remove obsolete TEST.README (results of an old TEST.sh for some old Unices) and TEST.csh (old tests without correct values, far less complete than TEST.sh). MFC after: 1 week
* Revert changes of 'assure' to 'ensure' made in r211936.brucec2010-09-111-1/+1
| | | | Approved by: rrs (mentor)
* test(1): Fix markup, ( and ) must be separate arguments so leave spaces.jilles2010-09-101-1/+1
| | | | MFC after: 1 week
* test(1): Clarify grammar ambiguity and -a/-o vs shell &&/||.jilles2010-09-101-5/+12
|
* Fix incorrect usage of 'assure' and 'insure'.brucec2010-08-281-1/+1
| | | | Approved by: rrs (mentor)
* Change all our own code to use st_*tim instead of st_*timespec.ed2010-03-281-3/+3
| | | | Also remove some local patches to diff(1) which are now unneeded.
* Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant.jilles2009-05-262-9/+99
| | | | | | | | | | | | | | | | | | More precisely, this gives precedence to an interpretation not using the '(', ')', '-a' and '-o' in their special meaning, if possible. For example, it is now safe to write [ "$a" = "$b" ] and assume it compares the two strings. The man page already says that test(1) works this way, so does not need to be changed. Interpretation of input with more parameters tries a bit harder to find a valid parse in some cases. Add various additional test cases to TEST.sh. PR: standards/133369 Approved by: ed (mentor)
* - rename the RETURN VALUES section to EXIT STATUSdanger2009-01-071-1/+1
| | | | | | | - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days
* Simplify some markup.ru2006-12-141-32/+34
|
* Granting the amount of misunderstanding the last change received,yar2006-07-311-1/+7
| | | | extend it with an example to clarify the point.
* Document that both sides of -a or -o are always evaluated. Thisyar2006-07-271-1/+8
| | | | | | | | | "feature" doesn't seem to be in the standards or elsewhere, and it is against what we are used to in C and sh(1), so put the paragraph under BUGS. Pointed out by: dougb MFC after: 3 days
* /*- or .\"- or #- to begin license clauses.imp2005-01-103-2/+5
|
* Clarify: test compares strings by binary value, not "ASCII value".tjr2004-07-031-3/+3
|
* Mechanically kill hard sentence breaks.ru2004-07-021-2/+4
|
* Typo: s/SunOP/SunOS/g.maxim2004-06-161-2/+2
|
* Remove a duplicated description of the test for the null string.yar2004-06-071-5/+0
| | | | MFC after: 3 days
* Describe how test(1) will evaluate its expressions for a symlink.yar2004-06-071-1/+13
| | | | | Inspired by: SUSv3 MFC after: 1 week
* Remove clause 3 from the UCB licenses.markm2004-04-061-4/+0
| | | | OK'ed by: imp, core
* Don't escape names in MLINKS: this won't work with bsd.man.mk,v 1.53.ru2003-09-071-1/+1
|
* o Backout rev. 1.40 and rev. 1.49.maxim2002-08-151-36/+34
| | | | | | | | o Add argv[] boudary check. PR: bin/40117 Reviewed by: silence on -audit MFC after: 2 months
* Make test check the tv_nsec part of a struct stat when comparingdwmalone2002-07-271-8/+10
| | | | | | | | | the mtimes of a file. (This is probably only useful if you have vfs.timestamp_precision set to something nonzero). PR: 39163 Submitted by: Hal Burch <hburch@lumeta.com> MFC after: 2 weeks
* Fix a memory leak.maxim2002-07-051-0/+1
| | | | | PR: bin/40177 MFC after: 1 week
* Consistently use FBSDIDobrien2002-06-301-4/+2
|
* while i'm breaking stuff, use __dead2 instead of GCC specific __attribute__.alfred2002-05-111-2/+1
|
* backout additional include of cdefs.h, it's not helping any.alfred2002-05-111-1/+0
|
* include cdefs.h for __printf0like to silence warning.alfred2002-05-111-0/+1
|
* Use intmax_t as quad_t replacement, like in exprache2002-03-281-5/+6
|
* Log:maxim2002-03-061-10/+6
| | | | | | | | | | | Remove eaccess(2) absence workaround. Add eaccess(2) checks for FILRD, FILWR, FILEX and FILEXIST cases. We cannot MFC this because there is no eaccess(2) in -stable yet. PR: bin/35076 Reviewed by: ru Approved by: ru
* __printflike() should really be __printf0like() since verrx() cankris2002-02-041-1/+1
| | | | accept a NULL format string.
* Add a __printflike() attribute to silence warning with FORMAT_AUDIT=1kris2002-02-041-1/+2
|
* Work around a buffer overflow problem on argv that has been exposedknu2002-02-031-6/+16
| | | | | | | | | | | | | | | | | | after making test(1) a sh(1) builtin; sh(1) coredumps when you run something like this: sh -c 'test ! `true 1`' The cause is that the test(1) code totally depends on the presence of two extra cells at the end of argv that are filled with NULL's. The reason why the bug hasn't been exposed would be because the C startup code kindly prepares argv with some extra zeroed cells for a program. I know this is not the best fix, but since there are argv++'s without boundary checks everywhere, I'd rather patch it up like this (preparing a copy of argv with extra NULL's) for the moment. MFC after: 3 days
* o __P has been reovedimp2002-02-021-61/+32
| | | | | | | | | | | | | | | | | | o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
* strtoq -> strtoll (strtoq is deprecated)ache2001-12-251-5/+5
|
* 1) Localize (LC_CTYPE)ache2001-12-171-0/+11
| | | | | 2) Catch "" to 0 conversion for OSes that not catch it in strto*() (f.e. -stable). It is needed because POSIX agrees with both variants.
* POSIX strto*() functions MAY return EINVAL, so don't assume that only oneache2001-12-141-2/+4
| | | | errno from them allowed and it is always ERANGE
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyobrien2001-12-041-2/+0
| | | | | | set WARNS=0. Reviewed by: mike
OpenPOWER on IntegriCloud