From bb6d30656efa59e16d9abc20146accb24de17090 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 9 Mar 2020 04:00:31 -0400 Subject: Import /usr/src/bin/sh from FreeBSD 12.1-RELEASE --- bin/1sh/tests/builtins/trap2.0 | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 bin/1sh/tests/builtins/trap2.0 (limited to 'bin/1sh/tests/builtins/trap2.0') diff --git a/bin/1sh/tests/builtins/trap2.0 b/bin/1sh/tests/builtins/trap2.0 new file mode 100644 index 00000000..eb17a03e --- /dev/null +++ b/bin/1sh/tests/builtins/trap2.0 @@ -0,0 +1,52 @@ +# $FreeBSD: releng/12.1/bin/sh/tests/builtins/trap2.0 194517 2009-06-19 22:15:59Z jilles $ +# This is really a test for outqstr(), which is readily accessible via trap. + +runtest() +{ + teststring=$1 + trap -- "$teststring" USR1 + traps=$(trap) + if [ "$teststring" != "-" ] && [ -z "$traps" ]; then + # One possible reading of POSIX requires the above to return an + # empty string because backquote commands are executed in a + # subshell and subshells shall reset traps. However, an example + # in the normative description of the trap builtin shows the + # same usage as here, it is useful and our /bin/sh allows it. + echo '$(trap) is broken' + exit 1 + fi + trap - USR1 + eval "$traps" + traps2=$(trap) + if [ "$traps" != "$traps2" ]; then + echo "Mismatch for '$teststring'" + exit 1 + fi +} + +runtest 'echo' +runtest 'echo hi' +runtest "'echo' 'hi'" +runtest '"echo" $PATH' +runtest '\echo "$PATH"' +runtest ' 0' +runtest '0 ' +runtest ' 1' +runtest '1 ' +i=1 +while [ $i -le 127 ]; do + c=$(printf \\"$(printf %o $i)") + if [ $i -lt 48 ] || [ $i -gt 57 ]; then + runtest "$c" + fi + runtest " $c$c" + runtest "a$c" + i=$((i+1)) +done +IFS=, +runtest ' ' +runtest ',' +unset IFS +runtest ' ' + +exit 0 -- cgit 1.4.1 ct name='qt'>
path: root/configfile.c (unfollow)
Commit message (Expand)Author
2009-08-18Add and use a common readfile() functionLars Hjemli
2009-08-18truncate buffer before reading empty filesSimon Arlott
2009-08-18ui-shared: don't print header <img/> if there isn't a logo definedMatthew Metnetsky
2009-08-17cgit.c: do not segfault on unexpected query-string formatLars Hjemli
2009-08-17ui-tag.c: do not segfault when id is missing from query-stringLars Hjemli
2009-08-16ui-log.c: handle lightweight tags when printing commit decorationsLars Hjemli
2009-08-16ui-refs.c: improve handling of lightweight tagsStefan Bühler
2009-08-16Use GIT-1.6.3.4Lars Hjemli
2009-08-11ui-shared: add support for header/footer options when embedded=1Lars Hjemli
2009-08-10cgitrc.5.txt: describe where/how cgit will locate cgitrcLars Hjemli
2009-08-10cgit.c: make '/cgit.png' the default value for 'logo' optionLars Hjemli
2009-08-10cgit.css: align commit message with subject in expanded log listingLars Hjemli
2009-08-10ui-shared: add support for NO_HTTP=1/--nohttpLars Hjemli
2009-08-10Cleanup handling of environment variablesLars Hjemli
2009-08-09Add some example filter scriptsLars Hjemli
2009-08-09Add 'about-filter' and 'repo.about-filter' optionsLars Hjemli
2009-08-09ui-summary: enable arbitrary paths below repo.readmeLars Hjemli
2009-08-09cgit.c: allow repo.*-filter options to unset the current defaultLars Hjemli
2009-08-09Add support for repo.commit-filter and repo.source-filterLars Hjemli
2009-08-08Expose file extension in tree lists as class to allow nicer tree stylingMartin Szulecki
2009-08-08Introduce noplainemail option to hide email adresses from spambotsMartin Szulecki
2009-07-31ui-commit: add support for 'commit-filter' optionLars Hjemli
2009-07-31ui-tree: add support for source-filter optionLars Hjemli
2009-07-31ui-snapshot: use cgit_{open|close}_filter() to execute compressorsLars Hjemli
2009-07-31Add generic filter/plugin infrastructureLars Hjemli
2009-07-25Add support for mime type registration and lookupLars Hjemli
2009-07-25cgit.h: keep config flags sortedLars Hjemli
2009-07-25cgitrc.5.txt: document 'embedded' and 'noheader'Lars Hjemli
2009-07-25Add support for 'noheader' optionLars Hjemli
2009-07-25cgitrc.5.txt: document 'head-include'Lars Hjemli
2009-07-25ui-blob: return 'application/octet-stream' for binary blobsLars Hjemli
2009-07-25ui-plain: Return 'application/octet-stream' for binary files.Remko Tronçon
2009-06-11use cgit_httpscheme() for atom feedDiego Ongaro
2009-06-11add cgit_httpscheme() -> http:// or https://Diego Ongaro
2009-06-07Return http statuscode 404 on unknown branchLars Hjemli
2009-06-07Add head-include configuration option.Mark Lodato
2009-03-15CGIT 0.8.2.1Lars Hjemli
2009-03-15Fix doc-related glitches in Makefile and .gitignoreLars Hjemli
2009-03-15ui-snapshot: avoid segfault when no filename is specifiedLars Hjemli
2009-03-15fix segfault when displaying empty blobsEric Wong
2009-02-19Add support for HEAD requestsLars Hjemli
2009-02-19Add support for ETag in 'plain' viewLars Hjemli
2009-02-12ui-tree: escape ascii-text properly in hexdump viewLars Hjemli
2009-02-12Makefile: add doc-related targetsLars Hjemli