---
id: TASK-3.2
title: Fix clippy issues in core/exec tests
status: Done
assignee: []
created_date: '2026-02-23 19:31'
updated_date: '2026-02-23 19:35'
labels:
  - lint
  - tests
dependencies: []
references:
  - src/core/exec.rs
parent_task_id: TASK-3
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Resolve clippy warnings in exec tests (items_after_test_module, assertions on result, str_to_string) by reorganizing helpers and adjusting assertions.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Exec tests no longer trigger clippy warnings about items after test module, Result assertions, or str_to_string.
- [x] #2 Exec tests remain behavior-driven and do not execute real commands.
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
1) Move `pretty_cmd` and `shellish` above the test module to satisfy `items_after_test_module`.
2) Replace `assert!(result.is_ok())` with `result.unwrap()` in exec tests.
3) Replace `to_string()` with `to_owned()` in ExecError test.
4) Run `just check` to confirm exec warnings are gone.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Plan approved by user on 2026-02-23.

Moved pretty_cmd/shellish above tests, replaced Result is_ok assertion with expect, and switched str::to_string to to_owned in exec error test. Remaining clippy issues are in other modules.
<!-- SECTION:NOTES:END -->
