diff options
author | Nathan Eloe <powerofazure@gmail.com> | 2010-07-30 10:12:35 -0500 |
---|---|---|
committer | Nathan Eloe <powerofazure@gmail.com> | 2010-08-01 13:28:41 -0500 |
commit | fa750963bf8add5878e3da4c5849a91d7c6d0ecd (patch) | |
tree | f2653facaeeb28b00995b7efa6fbe4056bd2084b /bashast/gunit/function.gunit | |
parent | Escape character support (diff) | |
download | libbash-fa750963bf8add5878e3da4c5849a91d7c6d0ecd.tar.gz libbash-fa750963bf8add5878e3da4c5849a91d7c6d0ecd.tar.bz2 libbash-fa750963bf8add5878e3da4c5849a91d7c6d0ecd.zip |
Test functional redirection
Tests the functionality of the parser to redirect functional output.
No changes needed to grammar, just tests to ensure this works.
Diffstat (limited to 'bashast/gunit/function.gunit')
-rw-r--r-- | bashast/gunit/function.gunit | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bashast/gunit/function.gunit b/bashast/gunit/function.gunit index 012c69b..2799fa2 100644 --- a/bashast/gunit/function.gunit +++ b/bashast/gunit/function.gunit @@ -10,3 +10,7 @@ function: "function quit { exit; }" -> (function (STRING quit) (CURRSHELL (LIST (COMMAND (STRING exit))))) "function foo() { :; }" -> (function (STRING foo) (CURRSHELL (LIST (COMMAND (STRING :))))) "foo() { :; }" -> (function (STRING foo) (CURRSHELL (LIST (COMMAND (STRING :))))) + +"function quit { exit; } > /dev/null" -> (function (STRING quit) (CURRSHELL (LIST (COMMAND (STRING exit)))) (REDIR > (STRING / dev / null))) +"function help { echo hi; } 2> /dev/null" -> (function (STRING help) (CURRSHELL (LIST (COMMAND (STRING echo) (STRING hi)))) (REDIR 2 > (STRING / dev / null))) +"function help { echo 3; } 2> /dev/null > output" OK |