Add test coverage to pkg/term Upstream-commit: e57f8a78ae3291670c903784864d04139c821ea1 Component: engine