Skip to content

Commit 155ab28

Browse files
committed
test(client): expose ignored output and interactive defaults
1 parent 6dd305f commit 155ab28

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎src/test/java/io/github/easy4j/codex/CodexClientTest.java‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,28 @@ void shouldCloseWithoutError() {
704704
// default options from config
705705
// ----------------------------------------------------------------
706706

707+
@Test
708+
void shouldHonorJsonOutputFalseForDefaultExec() {
709+
CodexClientConfig config = echoConfig();
710+
config.setJsonOutput(false);
711+
712+
CodexCliResult result = new CodexClient(config).exec("hello");
713+
714+
assertFalse(result.getStdout().contains("--json"),
715+
"normal exec must honor CodexClientConfig.jsonOutput=false");
716+
}
717+
718+
@Test
719+
void shouldPropagateNoAltScreenToDefaultInteractiveSession() {
720+
CodexClientConfig config = echoConfig();
721+
config.setNoAltScreen(true);
722+
723+
CodexCliResult result = new CodexClient(config).startSession("hello");
724+
725+
assertTrue(result.getStdout().contains("--no-alt-screen"),
726+
"default interactive session must honor noAltScreen");
727+
}
728+
707729
@Test
708730
void shouldPropagateConfigDefaultsToExecOptions() {
709731
CodexClientConfig config = echoConfig();

0 commit comments

Comments
 (0)