дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 10:07:11 +02:00
Merge remote-tracking branch 'origin/main' into fix/python-remember-interpreters
Цей коміт міститься в:
коміт
b4ed841077
2 files changed
+12
-3
No files matched your search
@@ -117,7 +117,9 @@ fn sample_price_units() -> Value {
|
||||
|
||||
#[test]
|
||||
fn resolves_copilot_home_from_agent_env_or_user_home() {
|
||||
let home = std::path::Path::new("/home/test");
|
||||
// Absolute on every platform: `/home/test` has no drive on Windows.
|
||||
let home_dir = std::env::temp_dir().join("copilot-home-test");
|
||||
let home = home_dir.as_path();
|
||||
assert_eq!(
|
||||
super::config_dir(&[("COPILOT_HOME".into(), "/custom/copilot".into())], Some(home)).as_deref(),
|
||||
Some(std::path::Path::new("/custom/copilot"))
|
||||
|
||||
@@ -338,10 +338,17 @@ async fn rearrange_returns_utf16_edits_that_put_methods_in_order() {
|
||||
"class Board:\n def __init__(self):\n self.名前 = 1 # 初始化\n\n def 移动(self):\n return '→'\n"
|
||||
);
|
||||
// Already in order, or broken: nothing to do.
|
||||
std::fs::write(&path, rearranged.text()).unwrap();
|
||||
// The reordered text has the original's length: move the mtime, or a scan that lands in the
|
||||
// same timestamp tick (common on Windows) keeps the old buffer.
|
||||
let write_later = |text: &str, secs: u64| {
|
||||
std::fs::write(&path, text).unwrap();
|
||||
let file = std::fs::File::options().write(true).open(&path).unwrap();
|
||||
file.set_modified(std::time::SystemTime::now() + std::time::Duration::from_secs(secs)).unwrap();
|
||||
};
|
||||
write_later(&rearranged.text(), 2);
|
||||
f.sync().await;
|
||||
assert!(doc_rearrange(&f.host, "main", doc).await.unwrap().is_empty());
|
||||
std::fs::write(&path, "class A:\n def b(self\n def __init__(self): ...\n").unwrap();
|
||||
write_later("class A:\n def b(self\n def __init__(self): ...\n", 4);
|
||||
f.sync().await;
|
||||
assert!(doc_rearrange(&f.host, "main", doc).await.unwrap().is_empty());
|
||||
}
|
||||
|
||||
Reference in new issue
Заблокувати користувача