Skip to content

Commit

Permalink
cmd/cue/cmd: allow "exec" in commands for TestX
Browse files Browse the repository at this point in the history
Change-Id: I798dee179527fa4fa2c761fbccc0d0b5d903c175
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9343
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
mpvl committed Apr 8, 2021
1 parent 72e8fb4 commit a8ae7d1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/cue/cmd/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ func TestX(t *testing.T) {
for s := bufio.NewScanner(bytes.NewReader(a.Comment)); s.Scan(); {
cmd := s.Text()
cmd = strings.TrimLeft(cmd, "! ")
if strings.HasPrefix(cmd, "exec ") {
cmd = cmd[len("exec "):]
}
if !strings.HasPrefix(cmd, "cue ") {
continue
}
Expand Down

0 comments on commit a8ae7d1

Please sign in to comment.