mirror of
https://github.com/google/gn-language-server.git
synced 2025-12-23 12:26:43 +00:00
Add a completion test
This commit is contained in:
parent
21874836d0
commit
88c6a4b404
8 changed files with 212 additions and 8 deletions
15
testdata/workspaces/completion/.gn
vendored
Normal file
15
testdata/workspaces/completion/.gn
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
buildconfig = "//BUILDCONFIG.gn"
|
||||
38
testdata/workspaces/completion/BUILD.gn
vendored
Normal file
38
testdata/workspaces/completion/BUILD.gn
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//defs1.gni")
|
||||
import("//defs1.gni")
|
||||
|
||||
outer_variable = true
|
||||
_outer_variable = true
|
||||
|
||||
template("_outer_template") {}
|
||||
|
||||
template("outer_template") {
|
||||
inner_variable = true
|
||||
_inner_variable = true
|
||||
|
||||
template("_inner_template") {}
|
||||
|
||||
template("inner_template") {
|
||||
child_variable = true
|
||||
_child_variable = true
|
||||
|
||||
template("child_template") {}
|
||||
template("_child_template") {}
|
||||
}
|
||||
|
||||
# complete here
|
||||
}
|
||||
19
testdata/workspaces/completion/BUILDCONFIG.gn
vendored
Normal file
19
testdata/workspaces/completion/BUILDCONFIG.gn
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
config_variable = true
|
||||
_config_variable = true
|
||||
|
||||
template("config_template") {}
|
||||
template("_config_template") {}
|
||||
22
testdata/workspaces/completion/defs1.gni
vendored
Normal file
22
testdata/workspaces/completion/defs1.gni
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//defs2.gni")
|
||||
import("//defs2.gni")
|
||||
|
||||
import_variable = true
|
||||
_import_variable = true
|
||||
|
||||
template("import_template") {}
|
||||
template("_import_template") {}
|
||||
19
testdata/workspaces/completion/defs2.gni
vendored
Normal file
19
testdata/workspaces/completion/defs2.gni
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2025 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
indirect_variable = true
|
||||
_indirect_variable = true
|
||||
|
||||
template("indirect_template") {}
|
||||
template("_indirect_template") {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue