use rpki::rtr::admin::tail_log_lines; #[test] fn tail_log_lines_returns_requested_suffix() { let output = tail_log_lines(b"one\ntwo\nthree\nfour\n".to_vec(), 2); assert_eq!(output, b"three\nfour\n"); } #[test] fn tail_log_lines_returns_whole_buffer_when_shorter() { let output = tail_log_lines(b"one\ntwo\n".to_vec(), 5); assert_eq!(output, b"one\ntwo\n"); }