Lines Matching defs:buf
171 let mut buf = [0u8; 5];
173 master.read_exact(&mut buf).unwrap();
174 assert_eq!(&buf, b"hello");
178 master.read_exact(&mut buf).unwrap();
179 assert_eq!(&buf, b"hello");
188 let mut buf = [0u8; 5];
190 slave.read_exact(&mut buf).unwrap();
191 assert_eq!(&buf, b"adios");
195 slave.read_exact(&mut buf).unwrap();
196 assert_eq!(&buf, b"adios");
210 let mut buf = [0u8; 10];
212 crate::read_exact(pty.slave, &mut buf);
214 assert_eq!(&buf, string.as_bytes());
218 let mut buf = [0u8; 11];
219 crate::read_exact(pty.master, &mut buf);
220 assert_eq!(&buf, echoed_string.as_bytes());
224 let mut buf = [0u8; 14];
226 crate::read_exact(pty.master, &mut buf);
228 assert_eq!(&buf, echoed_string2.as_bytes());
259 let mut buf = [0u8; 10];
261 crate::read_exact(pty.slave, &mut buf);
263 assert_eq!(&buf, string.as_bytes());
267 crate::read_exact(pty.master, &mut buf);
268 assert_eq!(&buf, echoed_string.as_bytes());
272 let mut buf = [0u8; 13];
274 crate::read_exact(pty.master, &mut buf);
276 assert_eq!(&buf, echoed_string2.as_bytes());
304 let mut buf = [0u8; 10];
306 crate::read_exact(pty.master, &mut buf);
309 assert_eq!(&buf, echoed_string.as_bytes());