diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-22 15:32:31 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:38:57 +0200 |
commit | b0b048c03930b826ab3dbf88b56fd664fca26886 (patch) | |
tree | d6e5e89fb40a31136f6d3e870e59c23f14b70631 /libbuild2/script/lexer+command-expansion.test.testscript | |
parent | b27f36b7af5186ad66fd1afa6e7fdc742f2aa1bd (diff) |
Add script command redirect aliases
Diffstat (limited to 'libbuild2/script/lexer+command-expansion.test.testscript')
-rw-r--r-- | libbuild2/script/lexer+command-expansion.test.testscript | 102 |
1 files changed, 88 insertions, 14 deletions
diff --git a/libbuild2/script/lexer+command-expansion.test.testscript b/libbuild2/script/lexer+command-expansion.test.testscript index 9422cba..f4d69d2 100644 --- a/libbuild2/script/lexer+command-expansion.test.testscript +++ b/libbuild2/script/lexer+command-expansion.test.testscript @@ -113,17 +113,37 @@ test.arguments = command-expansion { : newline : - $* <:"0<a b" >>EOO + $* <:"0<<<=a b" >>EOO '0' - < + <<<= 'a b' EOO : no-newline : - $* <:"0<:a b" >>EOO + $* <:"0<<<=:a b" >>EOO '0' - <: + <<<=: + 'a b' + EOO + } + + : in-alias + : + { + : newline + : + $* <:"0<<<a b" >>EOO + '0' + <<< + 'a b' + EOO + + : no-newline + : + $* <:"0<<<:a b" >>EOO + '0' + <<<: 'a b' EOO } @@ -133,17 +153,17 @@ test.arguments = command-expansion { : newline : - $* <:"1>a b" >>EOO + $* <:"1>>>?a b" >>EOO '1' - > + >>>? 'a b' EOO : no-newline : - $* <:"1>:a b" >>EOO + $* <:"1>>>?:a b" >>EOO '1' - >: + >>>?: 'a b' EOO } @@ -157,6 +177,26 @@ test.arguments = command-expansion { : newline : + $* <:"0<<=E O I" >>EOO + '0' + <<= + 'E O I' + EOO + + : no-newline + : + $* <:"0<<=:E O I" >>EOO + '0' + <<=: + 'E O I' + EOO + } + + : in-alias + : + { + : newline + : $* <:"0<<E O I" >>EOO '0' << @@ -177,17 +217,17 @@ test.arguments = command-expansion { : newline : - $* <:"1>>E O O" >>EOO + $* <:"1>>?E O O" >>EOO '1' - >> + >>? 'E O O' EOO : no-newline : - $* <:"1>>:E O O" >>EOO + $* <:"1>>?:E O O" >>EOO '1' - >>: + >>?: 'E O O' EOO } @@ -198,9 +238,17 @@ test.arguments = command-expansion { : in : - $* <:"0<<<a b" >>EOO + $* <:"0<=a b" >>EOO '0' - <<< + <= + 'a b' + EOO + + : in-alias + : + $* <:"0<a b" >>EOO + '0' + < 'a b' EOO @@ -212,6 +260,14 @@ test.arguments = command-expansion 'a b' EOO + : out-alias + : + $* <:"1>a b" >>EOO + '1' + > + 'a b' + EOO + : out-app : $* <:"1>+a b" >>EOO @@ -219,8 +275,26 @@ test.arguments = command-expansion >+ 'a b' EOO + + : out-app-alias + : + $* <:"1>>a b" >>EOO + '1' + >> + 'a b' + EOO } +: no-out-alias +: +$* <:"1>>>a b" >>EOO +'1' +>> +> +'a b' +EOO + + : cleanup : { |