# Just like other commands, we can fix with stdin/stdout.
stdin p/three.cue
exec cue fix -
cmp stdout p/three.cue.fixed

# Make sure we fix all files in a directory, even if they're a mix of packages (or no packages).
exec cue fix ./...
cmp p/one.cue p/one.cue.fixed
cmp p/two.cue p/two.cue.fixed
cmp p/three.cue p/three.cue.fixed

-- p/one.cue --
package one

out: ["foo"] + ["bar"]
-- p/two.cue --
package two

out: 3 * ["baz"]
-- p/three.cue --
out: ["a"] + ((["a"]*7) + ["gh"])
-- p/one.cue.fixed --
package one

import "list"

out: list.Concat([["foo"], ["bar"]])
-- p/two.cue.fixed --
package two

import "list"

out: list.Repeat(["baz"], 3)
-- p/three.cue.fixed --
import "list"

out: list.Concat([["a"], (list.Concat([(list.Repeat(["a"], 7)), ["gh"]]))])
