From 935c68573f8e63468723dc2691957637e4e6bcb7 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 10 Jan 2019 18:48:02 -0500 Subject: Import /usr/src/bin/sh from FreeBSD 12.0-RELEASE --- bin/cash/tests/expansion/cmdsubst2.0 | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 bin/cash/tests/expansion/cmdsubst2.0 (limited to 'bin/cash/tests/expansion/cmdsubst2.0') diff --git a/bin/cash/tests/expansion/cmdsubst2.0 b/bin/cash/tests/expansion/cmdsubst2.0 new file mode 100644 index 00000000..f3bbcfbb --- /dev/null +++ b/bin/cash/tests/expansion/cmdsubst2.0 @@ -0,0 +1,43 @@ +# $FreeBSD: releng/12.0/bin/sh/tests/expansion/cmdsubst2.0 205105 2010-03-12 23:23:46Z jilles $ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +check '`echo /et[c]/` = "/etc/"' +check '`printf /var/empty%s /et[c]/` = "/var/empty/etc/"' +check '"`echo /et[c]/`" = "/etc/"' +check '`echo "/et[c]/"` = "/etc/"' +check '`printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"' +check '`printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""' +check '"`echo \"/et[c]/\"`" = "/et[c]/"' +check '"`echo "/et[c]/"`" = "/et[c]/"' +check '`echo $$` = $$' +check '"`echo $$`" = $$' +check '`echo \$\$` = $$' +check '"`echo \$\$`" = $$' + +# Command substitutions consisting of a single builtin may be treated +# differently. +check '`:; echo /et[c]/` = "/etc/"' +check '`:; printf /var/empty%s /et[c]/` = "/var/empty/etc/"' +check '"`:; echo /et[c]/`" = "/etc/"' +check '`:; echo "/et[c]/"` = "/etc/"' +check '`:; printf /var/empty%s "/et[c]/"` = "/var/empty/et[c]/"' +check '`:; printf /var/empty/%s \"/et[c]/\"` = "/var/empty/\"/et[c]/\""' +check '"`:; echo \"/et[c]/\"`" = "/et[c]/"' +check '"`:; echo "/et[c]/"`" = "/et[c]/"' +check '`:; echo $$` = $$' +check '"`:; echo $$`" = $$' +check '`:; echo \$\$` = $$' +check '"`:; echo \$\$`" = $$' + +check '`set -f; echo /et[c]/` = "/etc/"' +check '"`set -f; echo /et[c]/`" = "/et[c]/"' + +exit $((failures > 0)) -- cgit 1.4.1 ?id=e2be3c85131896e203f7ba16d883bc61bfa09064&showmsg=1&follow=1'>root/state.c (unfollow)
Commit message (Collapse)Author
2019-10-23Synchronize state after client registrationJune McEnroe
2019-10-23Send to server if client has no needsJune McEnroe
2019-10-23Implement some amount of client connectionJune McEnroe
2019-10-23Set clients non-blockingJune McEnroe
2019-10-23Clean up state.c and factor out parsingJune McEnroe
2019-10-23Respond to pingsJune McEnroe
2019-10-23Add verbose flagJune McEnroe
2019-10-23Set NOSIGPIPE on server connectionJune McEnroe
2019-10-23Set an initial loop capJune McEnroe
2019-10-23Fix rest parsingJune McEnroe
2019-10-23Add dynamic poll listJune McEnroe
2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe
2019-10-23Clean up state somewhatJune McEnroe
2019-10-23Actually send the buffer...June McEnroe
2019-10-23Add stateJune McEnroe