Skip to content

Commit 984850a

Browse files
author
David Kellermann
committed
add test for correct dumping of attributes on modules
1 parent 9322ee5 commit 984850a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/modules.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,3 +998,25 @@ fn empty_doc_attribute_on_module() {
998998
.stdout("Available recipes:\n foo ...\n")
999999
.run();
10001000
}
1001+
1002+
#[test]
1003+
fn modules_with_attributes_are_dumped_correctly() {
1004+
Test::new()
1005+
.write("foo.just", "foo:\n @echo FOO")
1006+
.justfile(
1007+
"
1008+
# doc
1009+
[group('bar')]
1010+
mod foo
1011+
",
1012+
)
1013+
.arg("--dump")
1014+
.stdout(
1015+
"
1016+
# doc
1017+
[group('bar')]
1018+
mod foo
1019+
",
1020+
)
1021+
.run();
1022+
}

0 commit comments

Comments
 (0)