From 0b88b64db012e3f4638efdf500f652bee61fc6ac Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Sep 2026 11:54:52 +0200 Subject: [PATCH] Add regression tests for doc comment attribute formatting Signed-off-by: Christoph Knittel --- .../printer/comments/docCommentAttributes.res | 21 +++++++++++++++++++ .../expected/docCommentAttributes.res.txt | 21 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/syntax_tests/data/printer/comments/docCommentAttributes.res create mode 100644 tests/syntax_tests/data/printer/comments/expected/docCommentAttributes.res.txt diff --git a/tests/syntax_tests/data/printer/comments/docCommentAttributes.res b/tests/syntax_tests/data/printer/comments/docCommentAttributes.res new file mode 100644 index 0000000000..247d422aa0 --- /dev/null +++ b/tests/syntax_tests/data/printer/comments/docCommentAttributes.res @@ -0,0 +1,21 @@ +/** Doc comment */ +@a @b +external f: unit => unit = "f" + +/* Normal comment */ +@a @b +external f: unit => unit = "f" + +/** +Doc comment Doc comment Doc comment Doc comment Doc comment +Doc comment Doc comment Doc comment Doc comment Doc comment +*/ +@a @b +external f: unit => unit = "f" + +/* +Normal comment Normal comment Normal comment Normal comment Normal comment +Normal comment Normal comment Normal comment Normal comment Normal comment +*/ +@a @b +external f: unit => unit = "f" diff --git a/tests/syntax_tests/data/printer/comments/expected/docCommentAttributes.res.txt b/tests/syntax_tests/data/printer/comments/expected/docCommentAttributes.res.txt new file mode 100644 index 0000000000..247d422aa0 --- /dev/null +++ b/tests/syntax_tests/data/printer/comments/expected/docCommentAttributes.res.txt @@ -0,0 +1,21 @@ +/** Doc comment */ +@a @b +external f: unit => unit = "f" + +/* Normal comment */ +@a @b +external f: unit => unit = "f" + +/** +Doc comment Doc comment Doc comment Doc comment Doc comment +Doc comment Doc comment Doc comment Doc comment Doc comment +*/ +@a @b +external f: unit => unit = "f" + +/* +Normal comment Normal comment Normal comment Normal comment Normal comment +Normal comment Normal comment Normal comment Normal comment Normal comment +*/ +@a @b +external f: unit => unit = "f"