diff --git a/server/.gitignore b/server/.gitignore index 183f581..24bafab 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,7 +1,7 @@ mapserver world.mt output -map.sqlite +/server/map.sqlite mapserver.sqlite mapserver.sqlite-journal mapserver.json diff --git a/server/map.sqlite b/server/map.sqlite new file mode 100644 index 0000000..226fa0f Binary files /dev/null and b/server/map.sqlite differ diff --git a/server/mapblockparser/parse_test.go b/server/mapblockparser/parse_test.go index 693823e..67dc082 100644 --- a/server/mapblockparser/parse_test.go +++ b/server/mapblockparser/parse_test.go @@ -54,7 +54,15 @@ func TestParse(t *testing.T) { t.Error("Underground flag") } - if len(mapblock.Mapdata) != 16384 { + if len(mapblock.Mapdata.ContentId) != 4096 { + t.Error("Mapdata length wrong") + } + + if len(mapblock.Mapdata.Param2) != 4096 { + t.Error("Mapdata length wrong") + } + + if len(mapblock.Mapdata.Param1) != 4096 { t.Error("Mapdata length wrong") } diff --git a/server/testutils/database.go b/server/testutils/database.go index adb84a9..33a19ca 100644 --- a/server/testutils/database.go +++ b/server/testutils/database.go @@ -39,7 +39,7 @@ func copy(src, dst string) error { func CreateTestDatabase(filename string) error { _, currentfilename, _, _ := runtime.Caller(0) - return copy(filepath.Dir(currentfilename)+"/testdata/map.sqlite", filename) + return copy(filepath.Dir(currentfilename)+"/testdata/map1.sqlite", filename) } //DB with metadata at 0,0,0 diff --git a/server/testutils/testdata/map1.sqlite b/server/testutils/testdata/map1.sqlite new file mode 100644 index 0000000..d4c5728 Binary files /dev/null and b/server/testutils/testdata/map1.sqlite differ