summary refs log tree commit diff
path: root/bin/1sh/tests/builtins/command8.0
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/1sh/tests/builtins/command8.045
1 files changed, 45 insertions, 0 deletions
diff --git a/bin/1sh/tests/builtins/command8.0 b/bin/1sh/tests/builtins/command8.0
new file mode 100644
index 00000000..f8350092
--- /dev/null
+++ b/bin/1sh/tests/builtins/command8.0
@@ -0,0 +1,45 @@
+# $FreeBSD: releng/12.1/bin/sh/tests/builtins/command8.0 213738 2010-10-12 18:20:38Z obrien $
+IFS=,
+
+SPECIAL="break,\
+	:,\
+	continue,\
+	. /dev/null,\
+	eval,\
+	exec,\
+	export -p,\
+	readonly -p,\
+	set,\
+	shift 0,\
+	times,\
+	trap,\
+	unset foo"
+
+set -e
+
+# Check that special builtins can be executed via "command".
+
+set -- ${SPECIAL}
+for cmd in "$@"
+do
+	${SH} -c "v=:; while \$v; do v=false; command ${cmd}; done" >/dev/null
+done
+
+while :; do
+	command break
+	echo Error on line $LINENO
+done
+
+set p q r
+command shift 2
+if [ $# -ne 1 ]; then
+	echo Error on line $LINENO
+fi
+
+(
+	command exec >/dev/null
+	echo Error on line $LINENO
+)
+
+set +e
+! command shift 2 2>/dev/null
> 2018-08-24Show hostname in title over SSHJune McEnroe 2018-08-23Alias bc='bc -l'June McEnroe 2018-08-20Update usage of scheme in READMEJune McEnroe 2018-08-20Use scheme.h in fbatt and fbclockJune McEnroe 2018-08-20Generate scheme.hJune McEnroe 2018-08-20Add dependencies on gfx.hJune McEnroe 2018-08-18Add Blondie — Heart of GlassJune McEnroe Why didn't I know about this song? I love it. 2018-08-18Set FCEDIT=$EDITORJune McEnroe 2018-08-18Only post commits with bodies to MastodonJune McEnroe 2018-08-18Run tf/cfg link script with /bin/shJune McEnroe 2018-08-18Run {,s,t}up with /bin/shJune McEnroe 2018-08-18Use whence instead of typeJune McEnroe type is an alias for whence -v and is more for human consumption. 2018-08-18Cut off path components until right prompt fitsJune McEnroe Keeps paths valid (from somehwere) rather than abrupt truncation. 2018-08-17Add "private" alias to source encrypted fileJune McEnroe Why is there no easy way to *edit* an encrypted file? 2018-08-17Add vim mapping to add a #includeJune McEnroe