diff --git a/test/js/bun/shell/brace.test.ts b/test/js/bun/shell/brace.test.ts index 06b928d09da4..a4cf3332fcb5 100644 --- a/test/js/bun/shell/brace.test.ts +++ b/test/js/bun/shell/brace.test.ts @@ -68,14 +68,7 @@ describe("$.braces", () => { ["{x,{a,,b}}", ["x", "a", "", "b"]], ["{x,{a,b,}}", ["x", "a", "b", ""]], ["{{a,},x}", ["a", "", "x"]], - ["{{a,}{b,}}", ["ab", "a", "b", ""]], ["p{q,{r,}{s,}}t", ["pqt", "prst", "prt", "pst", "pt"]], - // A nested comma-free `{}` previously parsed to 0 variants, which made - // expand_nested return early and drop the text after it. It is now 1 - // empty variant, matching calculate_expanded_amount and expand_flat. - ["{x,a{}b}", ["x", "ab"]], - ["{a,b{}}c", ["ac", "bc"]], - ["{x,{}y}", ["x", "y"]], ])("%s", (pattern, expected) => { expect($.braces(pattern)).toEqual(expected); }); @@ -222,6 +215,7 @@ describe("comma-less brace group is literal (bash 5.2)", () => { // `{foo}` with no comma is literal at any depth. ["{a,{b}}", ["a", "{b}"]], ["{a{b,c}}", ["{ab}", "{ac}"]], + ["{{a,}{b,}}", ["{ab}", "{a}", "{b}", "{}"]], // A comma outside every `{...}` does not make one expand. ["{foo},x", ["{foo},x"]], ["{a},{b}", ["{a},{b}"]],