MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / test_load_toml_file_valid

Function test_load_toml_file_valid

tests/agent_suite/agent_test.rs:5489–5497  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5487
5488#[test]
5489fn test_load_toml_file_valid() {
5490 let dir = TempDir::new().unwrap();
5491 let path = dir.path().join("test.toml");
5492 std::fs::write(&path, "key = \"value\"\nnumber = 42\n").unwrap();
5493 let val = load_toml_file(&path).expect("valid TOML should parse as document");
5494 let table = val.as_table().expect("top-level should be a table");
5495 assert_eq!(table.get("key").and_then(|v| v.as_str()), Some("value"));
5496 assert_eq!(table.get("number").and_then(|v| v.as_integer()), Some(42));
5497}
5498
5499#[test]
5500fn test_load_toml_file_invalid_returns_err() {

Callers

nothing calls this directly

Calls 2

writeFunction · 0.85
load_toml_fileFunction · 0.85

Tested by

no test coverage detected