diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-04-13 15:07:33 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-04-14 09:20:31 +0800 |
commit | 604169c50644cafde6af6b3cbed4aea6db4df721 (patch) | |
tree | 1c40a21ad07915c423c8b83d5c7b2c5b7d3be4e3 /test | |
parent | Move functions to @member section (diff) | |
download | libbash-604169c50644cafde6af6b3cbed4aea6db4df721.tar.gz libbash-604169c50644cafde6af6b3cbed4aea6db4df721.tar.bz2 libbash-604169c50644cafde6af6b3cbed4aea6db4df721.zip |
Support referring a whole array
Syntax like ${array[@]} and ${array[*]} is supported now. Currently
the only difference between the two is when they are used in a
double quoted string, ${array[*]} will use the first character of
IFS as delimiter rather than space. Rename some variables in test
script for better ordering.
Diffstat (limited to 'test')
-rw-r--r-- | test/variable_printer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/variable_printer.cpp b/test/variable_printer.cpp index 32fc161..ed4aa69 100644 --- a/test/variable_printer.cpp +++ b/test/variable_printer.cpp @@ -44,6 +44,8 @@ int main(int argc, char** argv) libbash::interpret(argv[1], variables); std::map<std::string, std::vector<std::string>> sorted(variables.begin(), variables.end()); + // Currently we don't need internal variables + sorted.erase("IFS"); using namespace boost::spirit::karma; std::cout << format((string << '=' << -(string % ' ')) % eol, sorted) << std::endl; |