Skip to content

Commit

Permalink
cmd/cue: add test case for issue 3262
Browse files Browse the repository at this point in the history
This CL adds the test case for editing a module
file with a module path that doesn't have a major
version suffix. The behavior will be fixed in the next
CL in the chain.

For #3262

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I1b26c462cf7e23240959eb904197dd12ee109479
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1197628
Reviewed-by: Paul Jolly <paul@myitcv.io>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
  • Loading branch information
rogpeppe committed Jul 12, 2024
1 parent 7793367 commit 56d6987
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cmd/cue/cmd/testdata/script/modedit_nomajorversion.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Test that we can use cue mod edit to change
# set a module path that does not contain a major
# version suffix.

exec cue mod init test.example
cmp cue.mod/module.cue want-module

# TODO this should not fail.
! exec cue mod edit --module other.example
cmp stderr want-stderr

-- want-module --
module: "test.example"
language: {
version: "v0.10.0"
}
-- want-stderr --
invalid argument "other.example" for "--module" flag: malformed module path "other.example": no major version found in module path

0 comments on commit 56d6987

Please sign in to comment.