z_mirror/fmm
git clone https://git.raiguard.me/z_mirror/fmm
6999def
trunk
1package fmm 2 3import ( 4"bytes" 5"os" 6"testing" 7 8"github.com/stretchr/testify/require" 9) 10 11func TestModSettings (t * testing.T ) { 12origBytes ,err := os .ReadFile ("../TEST/mods/mod-settings.dat" ) 13require .NoError (t ,err ) 14r := newDatReader (bytes .NewReader (origBytes )) 15settings := r .ReadModSettings () 16b := bytes.Buffer {} 17w := newDatWriter (& b ) 18w .WriteModSettings (& settings ) 19w .writer .Flush () 20newBytes := b .Bytes () 21require .Equal (t ,len (origBytes ),len (newBytes )) 22// We can't check specific contents because dictionaries may not be written in the same order they were read. 23}