internal/cuetxtar: add custom eq formatter for hidden fields and disjunctions
Replace the v.Syntax()-based formatValue with a custom eqWriteValue
implementation that:
- Emits hidden fields in _foo$pkg notation (matching astcmp.go) instead
of silently omitting them, which the old v.Syntax(Hidden(true)) call
would include but with Go-internal package paths rather than the
$pkg-suffix notation the test framework uses.
- Preserves adt.Disjunction structure as *d1 | d2 | d3 (with * marking
defaults) instead of collapsing to the default value via cue.Final().
- Emits adt.Conjunction values as c1 & c2 & c3.
- Falls back to v.Syntax() + format.Node for scalars and lists.
stripTestAttrs is removed; the new formatter never calls v.Syntax() for
structs so there are no source-level @test attributes to strip.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I6a25117d19b9a16db6dc942c6c905c8d49f0169a
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235356
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>