diff --git a/autotests/folding/test.bash.fold b/autotests/folding/test.bash.fold --- a/autotests/folding/test.bash.fold +++ b/autotests/folding/test.bash.fold @@ -10,3 +10,14 @@ pacman -Syu --needed intel-ucode grub pacman -syu --needed intel-ucode grub + +# Braces (bug ##387915) +[[ $line_name =~ \{([0-9]{1,})\}\{([0-9]{1,})\}(.*) ]] +[[ $name =~ (.*)_(S[0-9]{2})(E[0-9]{2,3}[a-z]{0,1})_(.*) ]] +rm /data/{hello1,hello2}/input/{bye1,$bye2}/si{a,${b},c{k,p{e,a}}}/*.non +rm /data/{aa,{e,i}t{b,c} # Not closed +rm /data{aa{bb{cc{dd}}}} +rm /data{aaa`aaa}aa`aaa}a + +${array[0]: -7 : + 22 } ${array[1]: num } +${parameter##word} ${parameter%%word} ${parameter^^pattern} ${parameter,,pattern} ${parameter@operator} diff --git a/autotests/html/test.bash.html b/autotests/html/test.bash.html --- a/autotests/html/test.bash.html +++ b/autotests/html/test.bash.html @@ -16,4 +16,15 @@ pacman -Syu --needed intel-ucode grub pacman -syu --needed intel-ucode grub + +# Braces (bug ##387915) +[[ $line_name =~ \{([0-9]{1,})\}\{([0-9]{1,})\}(.*) ]] +[[ $name =~ (.*)_(S[0-9]{2})(E[0-9]{2,3}[a-z]{0,1})_(.*) ]] +rm /data/{hello1,hello2}/input/{bye1,$bye2}/si{a,${b},c{k,p{e,a}}}/*.non +rm /data/{aa,{e,i}t{b,c} # Not closed +rm /data{aa{bb{cc{dd}}}} +rm /data{aaa`aaa}aa`aaa}a + +${array[0]: -7 : + 22 } ${array[1]: num } +${parameter##word} ${parameter%%word} ${parameter^^pattern} ${parameter,,pattern} ${parameter@operator} diff --git a/autotests/input/test.bash b/autotests/input/test.bash --- a/autotests/input/test.bash +++ b/autotests/input/test.bash @@ -10,3 +10,14 @@ pacman -Syu --needed intel-ucode grub pacman -syu --needed intel-ucode grub + +# Braces (bug ##387915) +[[ $line_name =~ \{([0-9]{1,})\}\{([0-9]{1,})\}(.*) ]] +[[ $name =~ (.*)_(S[0-9]{2})(E[0-9]{2,3}[a-z]{0,1})_(.*) ]] +rm /data/{hello1,hello2}/input/{bye1,$bye2}/si{a,${b},c{k,p{e,a}}}/*.non +rm /data/{aa,{e,i}t{b,c} # Not closed +rm /data{aa{bb{cc{dd}}}} +rm /data{aaa`aaa}aa`aaa}a + +${array[0]: -7 : + 22 } ${array[1]: num } +${parameter##word} ${parameter%%word} ${parameter^^pattern} ${parameter,,pattern} ${parameter@operator} diff --git a/autotests/reference/test.bash.ref b/autotests/reference/test.bash.ref --- a/autotests/reference/test.bash.ref +++ b/autotests/reference/test.bash.ref @@ -10,3 +10,14 @@
pacman intel-ucode grub
pacman intel-ucode grub
+
+# Braces (bug ##387915)
+[[ $line_name =~ \{([0-9]{1,})\}\{([0-9]{1,})\}(.*) ]]
+[[ $name =~ (.*)_(S[0-9]{2})(E[0-9]{2,3}[a-z]{0,1})_(.*) ]]
+rm /data/{hello1,hello2}/input/{bye1,$bye2}/si{a,${b},c{k,p{e,a}}}/*.non
+rm /data/{aa,{e,i}t{b,c} # Not closed
+rm /data{aa{bb{cc{dd}}}}
+rm /data{aaa`aaa}aa`aaa}a
+
+${array[0]: -7 : + 22 } ${array[1]: num }
+${parameter##word} ${parameter%%word} ${parameter^^pattern} ${parameter,,pattern} ${parameter@operator}
diff --git a/data/syntax/bash.xml b/data/syntax/bash.xml --- a/data/syntax/bash.xml +++ b/data/syntax/bash.xml @@ -8,7 +8,7 @@ ]> - + - + - + + + + + + + + + + + + + @@ -800,7 +813,7 @@ - + @@ -827,16 +840,18 @@ + - + + - +