use super::super::{NAMES, pool};
use super::route;
use std::io::Cursor;
#[test]
fn unknown_tool_name_surfaces_unknown_variant() {
let mut stdin = Cursor::new(Vec::<u8>::new());
let mut stdout = Vec::new();
let mut stderr = Vec::new();
let err = route("not_a_tool", &mut stdin, &mut stdout, &mut stderr).unwrap_err();
assert_eq!(
err.to_string(),
"unknown built-in tool: \"not_a_tool\"; available: \
apply_patch, bash, cd, dispatch, load_skill, message, read_file"
);
}
#[test]
fn pool_is_the_sorted_advertised_name_set() {
assert_eq!(
pool(),
"apply_patch, bash, cd, dispatch, load_skill, message, read_file"
);
let mut sorted = NAMES;
sorted.sort_unstable();
assert_eq!(NAMES, sorted);
}