Skip to content

Commit

Permalink
cmd/cue/cmd: add test for cue mod get with non-existent module
Browse files Browse the repository at this point in the history
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 <[email protected]>
Change-Id: I1e7a454120beb1b22e52c3175080cb80973cc874
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201492
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
rogpeppe committed Sep 19, 2024
1 parent 2b56c50 commit f1b72f5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cmd/cue/cmd/testdata/script/modtidy_not_found.txtar
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f1b72f5

Please sign in to comment.