summary refs log tree commit diff
path: root/bin/1sh/tests/expansion/cmdsubst3.0
diff options
context:
space:
mode:
Diffstat (limited to 'bin/1sh/tests/expansion/cmdsubst3.0')
-rw-r--r--bin/1sh/tests/expansion/cmdsubst3.023
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/1sh/tests/expansion/cmdsubst3.0 b/bin/1sh/tests/expansion/cmdsubst3.0
new file mode 100644
index 00000000..4089210c
--- /dev/null
+++ b/bin/1sh/tests/expansion/cmdsubst3.0
@@ -0,0 +1,23 @@
+# $FreeBSD: releng/12.1/bin/sh/tests/expansion/cmdsubst3.0 218819 2011-02-18 20:37:09Z jilles $
+
+unset LC_ALL
+export LC_CTYPE=en_US.ISO8859-1
+
+e=
+for i in 0 1 2 3; do
+	for j in 0 1 2 3 4 5 6 7; do
+		for k in 0 1 2 3 4 5 6 7; do
+			case $i$j$k in
+			000) continue ;;
+			esac
+			e="$e\n\\$i$j$k"
+		done
+	done
+done
+e1=$(printf "$e")
+e2="$(printf "$e")"
+[ "${#e1}" = 510 ] || echo length bad
+[ "$e1" = "$e2" ] || echo e1 != e2
+[ "$e1" = "$(printf "$e")" ] || echo quoted bad
+IFS=
+[ "$e1" = $(printf "$e") ] || echo unquoted bad