summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-10 21:09:00 +1100
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2026-02-10 21:09:00 +1100
commit1efe81498d2fbb91ecac80b57b6009a6399f2ba3 (patch)
treed06c4b84ad1869f3563dc1efbaa604029b8229cf /tests
parentbdb8de855fe54090a388a25c03ef19f279b13b19 (diff)
Add documentation to package hover info
Diffstat (limited to 'tests')
-rw-r--r--tests/hover_test.odin28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/hover_test.odin b/tests/hover_test.odin
index 35c2c4f..6cb9a7f 100644
--- a/tests/hover_test.odin
+++ b/tests/hover_test.odin
@@ -6105,6 +6105,34 @@ ast_hover_parapoly_overloaded_proc_with_bitfield :: proc(t: ^testing.T) {
}
test.expect_hover(t, &source, "test.entry: test.Entry(int, SmallHandle)")
}
+
+@(test)
+ast_hover_package_docs :: proc(t: ^testing.T) {
+ packages := make([dynamic]test.Package, context.temp_allocator)
+
+ append(
+ &packages,
+ test.Package {
+ pkg = "my_package",
+ source = `// Package docs
+ package my_package
+ Foo :: struct{}
+ `,
+ },
+ )
+ source := test.Source {
+ main = `package test
+ import "my_package"
+ main :: proc() {
+ foo := my_packa{*}ge.Foo{}
+ }
+ `,
+ packages = packages[:],
+ }
+
+ test.expect_hover(t, &source, "my_package: package\n---\nPackage docs")
+}
+
/*
Waiting for odin fix