diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 38a770066c0fd4a17764c6af101adf664a079897..9728e57a0ff8e7e54d6609f04ca412c2e86fb75a 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -31,6 +31,12 @@ echo @tab@word
 echo  @tab@word
 echo@tab@@tab@word
 echo @tab@ on @space@
+@echo --- @ with chains and brackets
+(echo the @ character chains until&&@echo we leave the current depth||(
+echo hidden
+@echo hidden
+))&&echo and can hide brackets||(@echo command hidden)||@(echo brackets hidden)
+@echo ---
 
 @echo off
 echo off@tab@@space@
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index d01a23ed47c17c314c8aee3285a95ef62efd59a5..c1f0d5f259c19881c38052376416cf2b45c04a7e 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -88,6 +88,13 @@ word
 @tab@word
 
 @pwd@>echo @tab@ on @space@@space@
+--- @ with chains and brackets
+
+@todo_wine@@pwd@>(echo the @ character chains until  && )  && echo and can hide brackets  || ()  ||@space@
+@todo_wine@the @ character chains until
+@todo_wine@we leave the current depth
+@todo_wine@and can hide brackets
+@todo_wine@---
 noecho1
 noecho2
 echo3