summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-09-14 22:40:35 +1000
committerGitHub <noreply@github.com>2021-09-14 14:40:35 +0200
commitd36b01ff6956930b51a80cd773f618b708a5f595 (patch)
treecd09e3530d9d2dc646c4c33a236e49a1fd8fce83 /cli/tests
parent5e2c5d0afa785b15c654b08409f0500ef9b96365 (diff)
fix(lsp): correctly parse registry patterns (#12063)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/testdata/lsp/registries/cde_tags.json4
-rw-r--r--cli/tests/testdata/lsp/registries/cdef_tags.json4
-rw-r--r--cli/tests/testdata/lsp/registries/complex.json5
-rw-r--r--cli/tests/testdata/lsp/registries/complex_efg.json6
-rw-r--r--cli/tests/testdata/lsp/registries/complex_efg_0.2.0.json6
-rw-r--r--cli/tests/testdata/lsp/registries/def_tags.json3
-rw-r--r--cli/tests/testdata/lsp/registries/deno-import-intellisense-complex.json22
-rw-r--r--cli/tests/testdata/lsp/registries/deno-import-intellisense-key-first.json18
-rw-r--r--cli/tests/testdata/lsp/registries/key_first.json5
9 files changed, 73 insertions, 0 deletions
diff --git a/cli/tests/testdata/lsp/registries/cde_tags.json b/cli/tests/testdata/lsp/registries/cde_tags.json
new file mode 100644
index 000000000..24aeba56a
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/cde_tags.json
@@ -0,0 +1,4 @@
+[
+ "1.0.0",
+ "1.0.1"
+]
diff --git a/cli/tests/testdata/lsp/registries/cdef_tags.json b/cli/tests/testdata/lsp/registries/cdef_tags.json
new file mode 100644
index 000000000..a69cb1c55
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/cdef_tags.json
@@ -0,0 +1,4 @@
+[
+ "2.0.0",
+ "2.0.1"
+]
diff --git a/cli/tests/testdata/lsp/registries/complex.json b/cli/tests/testdata/lsp/registries/complex.json
new file mode 100644
index 000000000..b6e28649a
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/complex.json
@@ -0,0 +1,5 @@
+[
+ "efg",
+ "efgh",
+ "fg"
+]
diff --git a/cli/tests/testdata/lsp/registries/complex_efg.json b/cli/tests/testdata/lsp/registries/complex_efg.json
new file mode 100644
index 000000000..cd170d1d8
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/complex_efg.json
@@ -0,0 +1,6 @@
+[
+ "0.2.2",
+ "0.2.1",
+ "0.2.0",
+ "0.1.0"
+]
diff --git a/cli/tests/testdata/lsp/registries/complex_efg_0.2.0.json b/cli/tests/testdata/lsp/registries/complex_efg_0.2.0.json
new file mode 100644
index 000000000..d333b9e28
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/complex_efg_0.2.0.json
@@ -0,0 +1,6 @@
+[
+ "mod.ts",
+ "example/mod.ts",
+ "CHANGELOG.md",
+ "deps.ts"
+]
diff --git a/cli/tests/testdata/lsp/registries/def_tags.json b/cli/tests/testdata/lsp/registries/def_tags.json
new file mode 100644
index 000000000..5a33204f2
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/def_tags.json
@@ -0,0 +1,3 @@
+[
+ "3.0.0"
+]
diff --git a/cli/tests/testdata/lsp/registries/deno-import-intellisense-complex.json b/cli/tests/testdata/lsp/registries/deno-import-intellisense-complex.json
new file mode 100644
index 000000000..98e913bdb
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/deno-import-intellisense-complex.json
@@ -0,0 +1,22 @@
+{
+ "version": 1,
+ "registries": [
+ {
+ "schema": "/:module([a-zA-Z0-9_]*)@:version/:path*",
+ "variables": [
+ {
+ "key": "module",
+ "url": "http://localhost:4545/lsp/registries/complex.json"
+ },
+ {
+ "key": "version",
+ "url": "http://localhost:4545/lsp/registries/complex_${module}.json"
+ },
+ {
+ "key": "path",
+ "url": "http://localhost:4545/lsp/registries/complex_${module}_${version}.json"
+ }
+ ]
+ }
+ ]
+}
diff --git a/cli/tests/testdata/lsp/registries/deno-import-intellisense-key-first.json b/cli/tests/testdata/lsp/registries/deno-import-intellisense-key-first.json
new file mode 100644
index 000000000..9aa33ecd3
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/deno-import-intellisense-key-first.json
@@ -0,0 +1,18 @@
+{
+ "version": 1,
+ "registries": [
+ {
+ "schema": "/:module([a-zA-Z0-9-_]+)@:tag([a-zA-Z0-9-_\\.]+)",
+ "variables": [
+ {
+ "key": "module",
+ "url": "http://localhost:4545/lsp/registries/key_first.json"
+ },
+ {
+ "key": "tag",
+ "url": "http://localhost:4545/lsp/registries/${module}_tags.json"
+ }
+ ]
+ }
+ ]
+}
diff --git a/cli/tests/testdata/lsp/registries/key_first.json b/cli/tests/testdata/lsp/registries/key_first.json
new file mode 100644
index 000000000..c95261b25
--- /dev/null
+++ b/cli/tests/testdata/lsp/registries/key_first.json
@@ -0,0 +1,5 @@
+[
+ "cde",
+ "cdef",
+ "def"
+]