cue/format: port format tests to cuetxtar
This allows us to save about forty lines of logic,
as it was largely duplicated with what cuetxtar already does.
While here, also start using an external test package,
as there's no reason for the tests to need to use unexported APIs.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Iabf75ae4a32983703ec1b245a78ce7747210abae
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1215471
Reviewed-by: Matthew Sackman <matthew@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>