170 lines
4.5 KiB
Rust
170 lines
4.5 KiB
Rust
#[allow(dead_code)]
|
|
#[path = "acp_common_tests/mod.rs"]
|
|
mod common_tests;
|
|
use common_tests::fixtures::run_test;
|
|
use common_tests::fixtures::server::AcpServerConnection;
|
|
use common_tests::{
|
|
run_close_session, run_config_mcp, run_config_option_mode_set, run_config_option_model_set,
|
|
run_delete_session, run_fs_read_text_file_true, run_fs_write_text_file_false,
|
|
run_fs_write_text_file_true, run_initialize_doesnt_hit_provider, run_list_sessions,
|
|
run_load_mode, run_load_model, run_load_session_error, run_load_session_mcp, run_mode_set,
|
|
run_model_list, run_model_set, run_model_set_error_session_not_found,
|
|
run_new_session_returns_initial_config, run_permission_persistence, run_prompt_basic,
|
|
run_prompt_codemode, run_prompt_error, run_prompt_image, run_prompt_image_attachment,
|
|
run_prompt_mcp, run_prompt_model_mismatch, run_prompt_skill, run_shell_terminal_false,
|
|
run_shell_terminal_true,
|
|
};
|
|
|
|
tests_config_option_set_error!(AcpServerConnection);
|
|
tests_mode_set_error!(AcpServerConnection);
|
|
|
|
#[test]
|
|
fn test_config_mcp() {
|
|
run_test(async { run_config_mcp::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_config_option_mode_set() {
|
|
run_test(async { run_config_option_mode_set::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_list_sessions() {
|
|
run_test(async { run_list_sessions::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_close_session() {
|
|
run_test(async { run_close_session::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_config_option_model_set() {
|
|
run_test(async { run_config_option_model_set::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_delete_session() {
|
|
run_test(async { run_delete_session::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_fs_read_text_file_true() {
|
|
run_test(async { run_fs_read_text_file_true::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_fs_write_text_file_false() {
|
|
run_test(async { run_fs_write_text_file_false::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_fs_write_text_file_true() {
|
|
run_test(async { run_fs_write_text_file_true::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_initialize_doesnt_hit_provider() {
|
|
run_test(async { run_initialize_doesnt_hit_provider::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_load_mode() {
|
|
run_test(async { run_load_mode::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_load_model() {
|
|
run_test(async { run_load_model::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_load_session_error_session_not_found() {
|
|
run_test(async { run_load_session_error::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_load_session_mcp() {
|
|
run_test(async { run_load_session_mcp::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_mode_set() {
|
|
run_test(async { run_mode_set::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_model_list() {
|
|
run_test(async { run_model_list::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_new_session_returns_initial_config() {
|
|
run_test(async { run_new_session_returns_initial_config::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_model_set() {
|
|
run_test(async { run_model_set::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_model_set_error_session_not_found() {
|
|
run_test(async { run_model_set_error_session_not_found::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_permission_persistence() {
|
|
run_test(async { run_permission_persistence::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_basic() {
|
|
run_test(async { run_prompt_basic::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_codemode() {
|
|
run_test(async { run_prompt_codemode::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_error_session_not_found() {
|
|
run_test(async { run_prompt_error::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_image() {
|
|
run_test(async { run_prompt_image::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_image_attachment() {
|
|
run_test(async { run_prompt_image_attachment::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_mcp() {
|
|
run_test(async { run_prompt_mcp::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_model_mismatch() {
|
|
run_test(async { run_prompt_model_mismatch::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_prompt_skill() {
|
|
run_test(async { run_prompt_skill::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_shell_terminal_false() {
|
|
run_test(async { run_shell_terminal_false::<AcpServerConnection>().await });
|
|
}
|
|
|
|
#[test]
|
|
fn test_shell_terminal_true() {
|
|
run_test(async { run_shell_terminal_true::<AcpServerConnection>().await });
|
|
}
|