aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/lexer+command-expansion.test.testscript
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/script/lexer+command-expansion.test.testscript')
-rw-r--r--libbuild2/script/lexer+command-expansion.test.testscript102
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
:
{