blob: b38cd3e3108f7a9ad6e11840b0f097ecc64cca0e [file] [log] [blame]
cue eval -i order.cue
cmp stdout expect-stdout-cue
-- frontmatter.toml --
title = "Order is irrelevant"
description = ""
-- text.md --
CUE's basic operations are defined in a way that the order in which
you combine two configurations is irrelevant to the outcome.
This is crucial property of CUE
that makes it easy for humans _and_ machines to reason over values and
makes advanced tooling and automation possible.
If you can think of an example where order matters, it is not valid CUE.
-- order.cue --
a: {x: 1, y: int}
a: {x: int, y: 2}
b: {x: int, y: 2}
b: {x: 1, y: int}
-- expect-stdout-cue --
a: {
x: 1
y: 2
}
b: {
x: 1
y: 2
}