The only test inside does this (it's marked #[should_panic]):
let mut lua = Lua::new();
let file = File::open(&Path::new("/path/to/unexisting/file")).unwrap();
let _res: () = lua.execute_from_reader(file).unwrap();
The second line will always panic (since the file indeed does not exist), so the execute_from_reader call is never reached.
The test probably should implement a simple struct that is Read and always returns an error when something tries to read from it.
I'm also wondering why this isn't a unit test. There doesn't seem to be a good reason.
The only test inside does this (it's marked
#[should_panic]
):The second line will always panic (since the file indeed does not exist), so the
execute_from_reader
call is never reached.The test probably should implement a simple
struct
that isRead
and always returns an error when something tries to read from it.I'm also wondering why this isn't a unit test. There doesn't seem to be a good reason.