Skip to content

Commit f77a689

Browse files
committed
fix: make ShowAgentDocumentation test behavioral not literal
Replaced hardcoded string assertions ('Cursor Engineering Guide') with behavioral checks: verify the command loaded and displayed AGENTS.md content successfully ('Runtime help from AGENTS.md') and output is non-empty. Future AGENTS.md edits will no longer require test changes.
1 parent adf262e commit f77a689

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/main_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,10 @@ TEST(AgentTest, ShowAgentDocumentation) {
130130
ui.show_agent_documentation();
131131
});
132132

133-
EXPECT_NE(output.find("Cursor Engineering Guide"), std::string::npos);
134-
EXPECT_NE(output.find("This document defines the operational rules for every engineering cycle."), std::string::npos);
133+
// Behavioral assertions: verify the command executed successfully
134+
// and loaded AGENTS.md content — do not assert literal document text
135+
EXPECT_NE(output.find("Runtime help from AGENTS.md"), std::string::npos);
136+
EXPECT_TRUE(output.size() > 100);
135137
}
136138

137139
TEST(AgentTest, ShouldCallAIByOutcome) {

0 commit comments

Comments
 (0)