aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-21 18:20:51 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-21 18:20:51 -0800
commitbc4340962480cc7e9d18a2057ca180f6380476cc (patch)
tree672b450c2b43abb03abece7137cd3593b6c78f88 /tests
parenta57077aba3780e011783bbd27485fd8c4eadfad0 (diff)
Expand the variable name as an ordinary parameter in for loops. Added
test for it too.
Diffstat (limited to 'tests')
-rw-r--r--tests/test9.in9
-rw-r--r--tests/test9.out2
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/test9.in b/tests/test9.in
index e449a21d..32a537f7 100644
--- a/tests/test9.in
+++ b/tests/test9.in
@@ -70,4 +70,13 @@ end
# Test implicit cd. This should do nothing.
./
+# Test special for loop expansion
+# Here we the name of the variable is derived from another variable
+echo "Testing for loop"
+set var1 var2
+for $var1 in 1 2 3
+ echo -n $var2
+end
+echo
+
false
diff --git a/tests/test9.out b/tests/test9.out
index cf9054f8..e44b2604 100644
--- a/tests/test9.out
+++ b/tests/test9.out
@@ -8,3 +8,5 @@ Foop
Foop
Foop
Doop
+Testing for loop
+123