Completely rework SNBT Parser
(NOTE: ChatGPT Was used for regex only)
This commit is contained in:
parent
7c87ef444f
commit
84192c69db
11 changed files with 150 additions and 107 deletions
|
@ -108,4 +108,19 @@ void main() {
|
|||
expect(ID.MSB, 0);
|
||||
expect(ID.LSB, 0);
|
||||
});
|
||||
|
||||
test("Convert real-world NBT to SNBT and back to NBT", () async {
|
||||
String OriginFile = "${Directory.current.path}/test/EL-ReducedList.dat";
|
||||
String OutputSNBT = "${Directory.current.path}/build/el-test.snbt";
|
||||
String OutputNBT = "${Directory.current.path}/build/el-test.nbt";
|
||||
|
||||
CompoundTag tag = await NbtIo.read(OriginFile);
|
||||
await SnbtIo.writeToFile(OutputSNBT, tag);
|
||||
|
||||
expect(File(OutputSNBT).existsSync(), true);
|
||||
tag = await SnbtIo.readFromFile(OutputSNBT) as CompoundTag;
|
||||
|
||||
await NbtIo.write(OutputNBT, tag);
|
||||
expect(File(OutputNBT).existsSync(), true);
|
||||
}, timeout: Timeout(Duration(hours: 90)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue