Permalink
Browse files

use the new tf env-array matching

  • Loading branch information...
1 parent f8a320a commit c2ebd645d8fafbe13c5cb4804fb3a221237f18a0 @mpapis mpapis committed Aug 9, 2012
Showing with 14 additions and 19 deletions.
  1. +1 −1 .travis.yml
  2. +13 −18 core/internal/shell/variables/file/array_file_comment_test.sh
View
@@ -3,7 +3,7 @@ rvm:
- 1.9.3
before_script:
- sudo apt-get install zsh
-install: gem install tf
+install: gem install tf -v '>=0.4.1'
script: find core/ -name '*_comment_test.sh' | xargs tf --text
notifications:
irc:
@@ -7,39 +7,34 @@ unset var1 var2
export -a var1 var2
printf "var1=(a1 b2)" > "${sm_temp_path}/test-me"
+# env[var1][]=0
__sm_variables_file_read_one "${sm_temp_path}/test-me" var1
-# status=0; env[var2]=/^$/
-
-echo ${var1[1]}
-# match=/^a1$/
-echo ${var1[@]}
-# match=/^a1 b2$/
+# status=0
+# env[var1][]=2
+# env[var1][]=/^a1 b2$/
+# env[var2][]=/^$/
: multi line read
unset var1 var2
export -a var1 var2
printf "var1=(\nc\nd\n)" > "${sm_temp_path}/test-me"
__sm_variables_file_read_one "${sm_temp_path}/test-me" var1
-# status=0; env[var2]=/^$/
-
-echo ${var1[1]}
-# match=/^c$/
-echo ${var1[@]}
-# match=/^c d$/
+# status=0
+# env[var1][]=2
+# env[var1][]=/^c d$/
+# env[var2][]=/^$/
: multi line read ... not quoted
unset var1 var2
export -a var1 var2
printf "var1=(\ne f\ng h\n)" > "${sm_temp_path}/test-me"
__sm_variables_file_read_one "${sm_temp_path}/test-me" var1
-# status=0; env[var2]=/^$/
-
-echo ${var1[1]}
-# match=/^e$/
-echo ${var1[@]}
-# match=/^e f g h$/
+# status=0
+# env[var1][]=4
+# env[var1][]=/^e f g h$/
+# env[var2][]=/^$/
: one line write
unset var1 var2

0 comments on commit c2ebd64

Please sign in to comment.