diff --git a/test/code/parser/scalar/encapsedString.test b/test/code/parser/scalar/encapsedString.test index 717f844..7e37961 100644 --- a/test/code/parser/scalar/encapsedString.test +++ b/test/code/parser/scalar/encapsedString.test @@ -13,6 +13,12 @@ Encapsed strings "${A}"; "${A['B']}"; "${$A}"; +"\{$A}"; +"\{ $A }"; +"\\{$A}"; +"\\{ $A }"; +"{$$A}[B]"; +"$$A[B]"; "A $B C"; b"$A"; ----- @@ -130,6 +136,64 @@ array( ) ) 11: Scalar_Encapsed( + parts: array( + 0: \{ + 1: Expr_Variable( + name: A + ) + 2: } + ) + ) + 12: Scalar_Encapsed( + parts: array( + 0: \{ + 1: Expr_Variable( + name: A + ) + 2: } + ) + ) + 13: Scalar_Encapsed( + parts: array( + 0: \ + 1: Expr_Variable( + name: A + ) + ) + ) + 14: Scalar_Encapsed( + parts: array( + 0: \{ + 1: Expr_Variable( + name: A + ) + 2: } + ) + ) + 15: Scalar_Encapsed( + parts: array( + 0: Expr_Variable( + name: Expr_Variable( + name: A + ) + ) + 1: [B] + ) + ) + 16: Scalar_Encapsed( + parts: array( + 0: $ + 1: Expr_ArrayDimFetch( + var: Expr_Variable( + name: A + ) + dim: Scalar_String( + value: B + ) + ) + ) + ) + 17: Scalar_Encapsed( parts: array( 0: A 1: Expr_Variable( @@ -138,11 +202,11 @@ array( 2: C ) ) - 12: Scalar_Encapsed( + 18: Scalar_Encapsed( parts: array( 0: Expr_Variable( name: A ) ) ) -) \ No newline at end of file +) diff --git a/test/code/prettyPrinter/literals.test b/test/code/prettyPrinter/literals.test index 621b59d..9eed443 100644 --- a/test/code/prettyPrinter/literals.test +++ b/test/code/prettyPrinter/literals.test @@ -55,9 +55,17 @@ STR; // strings (normalized to double quoted) "$a"; "a$b"; +"$a$b"; +"$a $b"; "a${b}c"; "a{$b}c"; "a$a[b]c"; +"\{$A}"; +"\{ $A }"; +"\\{$A}"; +"\\{ $A }"; +"{$$A}[B]"; +"$$A[B]"; <<