test for invalid named variables
authorMike Frysinger <vapier@gentoo.org>
Sat, 28 Mar 2009 21:06:38 +0000 (21:06 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Mar 2009 21:06:38 +0000 (21:06 -0000)
shell/hush_test/hush-vars/var3.right [new file with mode: 0644]
shell/hush_test/hush-vars/var3.tests [new file with mode: 0755]

diff --git a/shell/hush_test/hush-vars/var3.right b/shell/hush_test/hush-vars/var3.right
new file mode 100644 (file)
index 0000000..e772aaa
--- /dev/null
@@ -0,0 +1,3 @@
+hush: syntax error: unterminated ${name}
+hush: syntax error: unterminated ${name}
+hush: syntax error: unterminated ${name}
diff --git a/shell/hush_test/hush-vars/var3.tests b/shell/hush_test/hush-vars/var3.tests
new file mode 100755 (executable)
index 0000000..2947fcc
--- /dev/null
@@ -0,0 +1,4 @@
+# reject invalid vars
+hush -c 'echo ${1q}'
+hush -c 'echo ${&}'
+hush -c 'echo ${$}'