From f1b72f5fa906db656ca0c5268f5395f100d62341 Mon Sep 17 00:00:00 2001 From: Roger Peppe Date: Thu, 19 Sep 2024 12:12:28 +0100 Subject: [PATCH] cmd/cue/cmd: add test for `cue mod get` with non-existent module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error message for this is misleading, as the actual error is that there are no versions available for the module, but the error message talks about no major version. This will be fixed in a subsequent CL. Signed-off-by: Roger Peppe Change-Id: I1e7a454120beb1b22e52c3175080cb80973cc874 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201492 TryBot-Result: CUEcueckoo Reviewed-by: Daniel Martí Unity-Result: CUE porcuepine --- .../testdata/script/modtidy_not_found.txtar | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cmd/cue/cmd/testdata/script/modtidy_not_found.txtar diff --git a/cmd/cue/cmd/testdata/script/modtidy_not_found.txtar b/cmd/cue/cmd/testdata/script/modtidy_not_found.txtar new file mode 100644 index 00000000000..85c3a7e3928 --- /dev/null +++ b/cmd/cue/cmd/testdata/script/modtidy_not_found.txtar @@ -0,0 +1,20 @@ +! exec cue mod get other.test@v0 +cmp stderr want-stderr + +-- cue.mod/module.cue -- +module: "main.org@v0" +language: version: "v0.10.0" + +-- want-stderr -- +path "other.test" has no major version +-- main.cue -- +package main + +import "other.test/foo" +x: foo + +-- _registry/example.com_v0.0.1/cue.mod/module.cue -- +module: "example.com@v0" +language: version: "v0.8.0" +-- _registry/example.com_v0.0.1/top.cue -- +package main