Add integration test

This commit is contained in:
Johannes Wendel
2024-12-30 19:42:51 +01:00
parent baee4ab135
commit 9887ac97ac

23
tests/integration.rs Normal file
View File

@@ -0,0 +1,23 @@
use std::net::{TcpListener};
use std::io::Read;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let listener = TcpListener::bind("127.0.0.1:7878").unwrap();
let mut stream = listener.accept().unwrap().0;
let mut buf: [u8; 128] = [0; 128];
stream.read(&mut buf).unwrap();
for x in buf {
print!("{x}, ");
}
}
}