refactor(format): subqueries and CTE lists on Doc-IR; fix CTE commas with trailing style

This commit is contained in:
Hein
2026-10-06 14:57:21 +02:00
parent 488801b8b1
commit e9c0d52ae9
5 changed files with 69 additions and 50 deletions
+7
View File
@@ -38,3 +38,10 @@ func TestDocTrailingTextCountsTowardFit(t *testing.T) {
t.Errorf("got %q want %q", got, want)
}
}
func TestDocHardLineForcesBreakAndSkipsBlankIndent(t *testing.T) {
d := Group(Concat(Text("("), Indent(Concat(HardLine(), Lines("a\n\nb", "\n"))), HardLine(), Text(")")))
if got, want := Render(d, 0, " ", "\n"), "(\n a\n\n b\n)"; got != want {
t.Errorf("got %q want %q", got, want)
}
}