Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

fix: use expected line ending in codex-rs/core/config.schema.json (#10977)

Michael Bolin18bb25557c00
diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json
index 4025e3a2b7..53ab772492 100644
--- a/codex-rs/core/config.schema.json
+++ b/codex-rs/core/config.schema.json
@@ -1629,4 +1629,4 @@
},
"title": "ConfigToml",
"type": "object"
-}
+}
\ No newline at end of file
diff --git a/codex-rs/core/src/config/schema.rs b/codex-rs/core/src/config/schema.rs
index 0d54c13913..d5a02c8c6a 100644
--- a/codex-rs/core/src/config/schema.rs
+++ b/codex-rs/core/src/config/schema.rs
@@ -99,8 +99,11 @@ pub fn write_config_schema(out_path: &Path) -> anyhow::Result<()> {
mod tests {
use super::canonicalize;
use super::config_schema_json;
+ use super::write_config_schema;
+ use pretty_assertions::assert_eq;
use similar::TextDiff;
+ use tempfile::TempDir;
#[test]
fn config_schema_matches_fixture() {
@@ -128,5 +131,16 @@ mod tests {
Run `just write-config-schema` to overwrite with your changes.\n\n{diff}"
);
}
+
+ // Make sure the version in the repo matches exactly: https://github.com/openai/codex/pull/10977.
+ let tmp = TempDir::new().expect("create temp dir");
+ let tmp_path = tmp.path().join("config.schema.json");
+ write_config_schema(&tmp_path).expect("write config schema to temp path");
+ let tmp_contents =
+ std::fs::read_to_string(&tmp_path).expect("read back config schema from temp path");
+ assert_eq!(
+ fixture, tmp_contents,
+ "fixture should match exactly with generated schema"
+ );
}
}