# Verify that eval with --force works

# First time should simply succeed
exec cue eval -o eval.cue file.cue
cmp eval.cue eval.golden

# Second time will fail without --force
! exec cue eval -o eval.cue file.cue
stderr 'error writing "eval.cue": file already exists'

# Second time with --force should succeed
exec cue eval --force -o eval.cue file.cue
cmp eval.cue eval.golden

-- file.cue --
package hello

#who:    "World"
message: "Hello \(#who)!"
-- eval.golden --
#who:    "World"
message: "Hello World!"
