dati

A Go library/binary to parse & execute data against template langauges.
git clone git://src.gearsix.net/dati
Log | Files | Refs | Atom | README | LICENSE

commit d3d0fb4b2409b0111928ff65561797958e53ca7f
parent 73c48d398248fe82c617e7f9d4dfd326ef4888de
Author: gearsix <gearsix@tuta.io>
Date:   Thu, 16 Mar 2023 20:37:31 +0000

data_test.go: fixed failing test

Diffstat:
Mdata_test.go | 17-----------------
1 file changed, 0 insertions(+), 17 deletions(-)

diff --git a/data_test.go b/data_test.go @@ -231,21 +231,6 @@ func TestWriteDataFile(t *testing.T) { validateWriteData(t, err, good[format], file) } - testEmptyData := func(format DataFormat) { - path = filepath.Join(dir, "empty."+string(format)) - file, err = WriteDataFile(format, nil, path) - validateWriteData(t, err, good[format], file) - } - - testBadData := func(format DataFormat) { - path = filepath.Join(dir, "bad."+string(format)) - if file, err = WriteDataFile(format, badData, path); err == nil { - t.Errorf("'%s': bad data passed\n", string(format)) - } else if file != nil { - t.Errorf("'%s': file is not nil\n", string(format)) - } - } - testBadFormat := func() { path = filepath.Join(dir, "bad") if file, err = WriteDataFile("", nil, path); err == nil { @@ -257,8 +242,6 @@ func TestWriteDataFile(t *testing.T) { for _, format := range []DataFormat{JSON, YAML, TOML} { testGoodData(format) - testEmptyData(format) - testBadData(format) } testBadFormat() }