internal/cuetxtar: add txtar test
The Go tests are rather hard to read and thus
it is easy to miss whether they actually cover issues.
We add a txtar suite for testing update and force
modes as well as being able to test *negative* tests
and error reporting.
The idea is that most Go tests can move to this
framework. We just add tests for core functionality
now, but intend convert more down the line.
NOTE: looked into using the fs.FS functionality of
txtar, but most of the code modifies the archives,
So it wasn't all that beneficial.
Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: Ib6ddf804a3801b60ed446bb5e49982f60a9306cb
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1235495
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>