Skip to content

Commit f1b72f5

Browse files
committed
cmd/cue/cmd: add test for cue mod get with non-existent module
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]>
1 parent 2b56c50 commit f1b72f5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
! exec cue mod get other.test@v0
2+
cmp stderr want-stderr
3+
4+
-- cue.mod/module.cue --
5+
module: "main.org@v0"
6+
language: version: "v0.10.0"
7+
8+
-- want-stderr --
9+
path "other.test" has no major version
10+
-- main.cue --
11+
package main
12+
13+
import "other.test/foo"
14+
x: foo
15+
16+
-- _registry/example.com_v0.0.1/cue.mod/module.cue --
17+
module: "example.com@v0"
18+
language: version: "v0.8.0"
19+
-- _registry/example.com_v0.0.1/top.cue --
20+
package main

0 commit comments

Comments
 (0)