返回 CodeWhale
tests.rs
根目录 / crates / tui / src / core / engine / tests.rs
1 use super::*;
2
3 use super::context::COMPACTION_SUMMARY_MARKER;
4 use super::streaming::{TOOL_CALL_END_MARKERS, TOOL_CALL_MARKER_PAIRS};
5 use super::turn_loop::{
6 auto_review_block_tool_error, call_forces_prompt, initial_stream_error_user_message,
7 preview_request_error_user_message, registered_tool_approval_required,
8 registered_tool_forces_prompt, replace_runtime_mcp_tools, repo_law_must_block_without_prompt,
9 requested_sandbox_escalation, sandbox_escalation_denial, workspace_write_carve_out_applies,
10 };
11 use crate::config::ProviderKind;
12 use crate::prompts::{
13 InstructionSource, PromptSessionContext, system_prompt_flat_text,
14 system_prompt_for_mode_with_context_skills_and_session,
15 };
16 use crate::test_support::{EnvVarGuard, lock_test_env};
17 use codewhale_models::{SystemBlock, Usage};
18 use serde_json::{Value, json};
19 use std::collections::{HashMap, HashSet};
20 use std::ffi::OsString;
21 use std::fs;
22 use std::path::{Path, PathBuf};
23 use std::time::{Duration, Instant};
24 use tempfile::tempdir;
25
26 #[path = "tests/extension_hooks.rs"]
27 mod extension_hooks;
28 #[path = "tests/extension_prompts.rs"]
29 mod extension_prompts;
30
31 #[path = "tests/child_host.rs"]
32 mod child_host;
33
34 include!("tests/test_cases_01.rs");
35
36 mod compaction;
37 include!("tests/test_cases_02.rs");
38
39 include!("tests/test_cases_03.rs");
40
41 include!("tests/test_cases_04.rs");
42
43 include!("tests/test_cases_05.rs");
44
45 include!("tests/test_cases_06.rs");
46
47 include!("tests/test_cases_07.rs");
48
49 include!("tests/test_cases_08.rs");
50
51 include!("tests/test_cases_09.rs");
52
53 include!("tests/test_cases_10.rs");
54
55 include!("tests/test_cases_11.rs");
56
57 include!("tests/test_cases_12.rs");
58
59 include!("tests/test_cases_13.rs");
60
61 include!("tests/test_cases_14.rs");
62
63 include!("tests/test_cases_15.rs");
64
65 include!("tests/test_cases_16.rs");
66
67 include!("tests/test_cases_17.rs");
68
69 include!("tests/test_cases_18.rs");
70
71 include!("tests/test_cases_19.rs");
72
73 mod admission_gates;
74 mod runtime_state;
75 mod sse_turn_recovery;
76 mod tool_cancellation;
77 include!("tests/test_cases_20.rs");
78
79 #[path = "tests/rlm_host.rs"]
80 pub(crate) mod rlm_host;
81
81 lines RUST