()
| 2619 | FsEntry::Dir { path: "/sub" }, |
| 2620 | ]); |
| 2621 | |
| 2622 | let session = "ls | cat\nexit\n"; |
| 2623 | let (_, outcome, uart) = boot_kernel( |
| 2624 | cached_kernel(), |
| 2625 | Some(&shell), |
| 2626 | Some(&image), |
| 2627 | session, |
| 2628 | 120_000_000, |
| 2629 | ); |
| 2630 | |
| 2631 | assert!(!uart.contains("PANIC!"), "kernel panicked; uart={uart:?}"); |
| 2632 | let cmd = uart.find("ls | cat").expect("pipeline not echoed"); |
| 2633 | let after = &uart[cmd..]; |
| 2634 | assert!( |
| 2635 | after.contains("real.txt"), |
| 2636 | "real file missing from ls; uart={uart:?}" |
| 2637 | ); |
| 2638 | assert!( |
| 2639 | !after.contains(".pipe"), |
| 2640 | "pipe temp leaked into ls output; uart={uart:?}" |
| 2641 | ); |
| 2642 | assert!( |
| 2643 | matches!(outcome, RunOutcome::Halted(0)), |
| 2644 | "shell did not exit cleanly; outcome={outcome:?} uart={uart:?}" |
| 2645 | ); |
| 2646 | } |
| 2647 | |
| 2648 | // `cat < file` (no file operand, stdin redirected): cat reads the redirected file |
| 2649 | // and prints it. Proves the builtin input source also serves explicit `<`. |
nothing calls this directly
no test coverage detected