aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-06-28 22:43:50 +0800
committerMu Qiao <qiaomuf@gentoo.org>2011-07-18 23:23:53 +0800
commit3bd66c03c5ad80c17b442bdd7a66c563bc6557ab (patch)
tree2df96140e6a2087c9459786402b2338f71cf6686 /bashast
parentParser: support literal '$' in double quoted string (diff)
downloadlibbash-3bd66c03c5ad80c17b442bdd7a66c563bc6557ab.tar.gz
libbash-3bd66c03c5ad80c17b442bdd7a66c563bc6557ab.tar.bz2
libbash-3bd66c03c5ad80c17b442bdd7a66c563bc6557ab.zip
Build: use bash to verify test scripts
We keep the old style for some tests that behave differently depending on different bash versions.
Diffstat (limited to 'bashast')
-rw-r--r--bashast/libbashWalker.g11
1 files changed, 7 insertions, 4 deletions
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
index fe9e004..1edf10d 100644
--- a/bashast/libbashWalker.g
+++ b/bashast/libbashWalker.g
@@ -638,10 +638,13 @@ redirect_destination_input[std::unique_ptr<std::istream>& in]
argument[std::vector<std::string>& args]
: string_expr {
- if($string_expr.quoted)
- args.push_back($string_expr.libbash_value);
- else
- walker->split_word($string_expr.libbash_value, args);
+ if(!$string_expr.libbash_value.empty())
+ {
+ if($string_expr.quoted)
+ args.push_back($string_expr.libbash_value);
+ else
+ walker->split_word($string_expr.libbash_value, args);
+ }
};
logic_command_list