1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-23 15:47:45 +00:00

Add the player spawn packet test file

This commit is contained in:
Joshua Goins 2025-03-13 19:54:43 -04:00
parent 1141f6fb35
commit 2d991e8fe9
2 changed files with 5 additions and 2 deletions

Binary file not shown.

View file

@ -130,7 +130,7 @@ pub struct CustomizeData {
#[cfg(test)]
mod tests {
use std::{fs::read, io::Cursor};
use std::{fs::read, io::Cursor, path::PathBuf};
use binrw::BinRead;
@ -138,7 +138,10 @@ mod tests {
#[test]
fn read_playerspawn() {
let buffer = read("/home/josh/Downloads/myfile(1).dat").unwrap();
let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
d.push("resources/tests/player_spawn.dat");
let buffer = read(d).unwrap();
let mut buffer = Cursor::new(&buffer);
let player_spawn = PlayerSpawn::read_le(&mut buffer).unwrap();