aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-07-26 18:24:11 +0200
committerDanielGavin <danielgavin5@hotmail.com>2023-07-26 18:24:11 +0200
commit061dfb057bfcf471e9b78d23004c26224927e533 (patch)
tree284a599b307d37820f95c98aea8024244eb0907e /tests
parent597f12a8e0fca0c3e8087ab4ea4ae81e599f155f (diff)
Symbols that have @private on package is ignored when selecting from package.
Diffstat (limited to 'tests')
-rw-r--r--tests/completions_test.odin32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/completions_test.odin b/tests/completions_test.odin
index c4549b1..65078f9 100644
--- a/tests/completions_test.odin
+++ b/tests/completions_test.odin
@@ -2266,3 +2266,35 @@ ast_implicit_bitset_value_decl_from_package :: proc(t: ^testing.T) {
test.expect_completion_labels(t, &source, ".", {"Aa", "Ab", "Ac", "Ad"})
}
+
+@(test)
+ast_private_proc_ignore :: proc(t: ^testing.T) {
+ packages := make([dynamic]test.Package)
+
+ append(
+ &packages,
+ test.Package{
+ pkg = "my_package",
+ source = `package my_package
+ @(private)
+ my_private :: proc() {}
+
+ @private
+ my_private_two :: proc() {}
+
+ `,
+ },
+ )
+
+ source := test.Source {
+ main = `package main
+ import "my_package"
+ main :: proc() {
+ my_package.{*}
+ }
+ `,
+ packages = packages[:],
+ }
+
+ test.expect_completion_labels(t, &source, ".", {})
+}