()
| 1460 | assert!( |
| 1461 | uart.contains("HELLO"), |
| 1462 | "`la` + .asciz did not print the data-section string; uart={uart:?}" |
| 1463 | ); |
| 1464 | assert!( |
| 1465 | uart.contains("[exit 42]"), |
| 1466 | "call/ret did not produce exit 42; uart={uart:?}" |
| 1467 | ); |
| 1468 | assert!( |
| 1469 | matches!(outcome, RunOutcome::Halted(0)), |
| 1470 | "shell did not survive the run and exit cleanly; outcome={outcome:?} uart={uart:?}" |
| 1471 | ); |
| 1472 | } |
| 1473 | |
| 1474 | #[test] |
| 1475 | fn kernel_shell_assembles_section_and_data_directives() { |
| 1476 | let source = b"\ |
| 1477 | .section .text |
| 1478 | .globl _start |
| 1479 | _start: |
| 1480 | la t0, bytes |
| 1481 | lbu t1, 0(t0) |
| 1482 | li t2, 7 |
| 1483 | bne t1, t2, fail |
| 1484 | lw t1, 4(t0) |
| 1485 | li t2, 42 |
| 1486 | bne t1, t2, fail |
nothing calls this directly
no test coverage detected