diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-07-25 02:40:14 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-25 02:40:14 +0300 |
| commit | 8afd52ae57f9237f4f46138ad224dfc621d7ba59 (patch) | |
| tree | 349bbbd86c57863539ebc4c2eacf34550e076fa2 /scripts/test_vendor_portable_pty.py | |
| parent | 5f1957c27bd23f73b339265d3acd32f4a21878a3 (diff) | |
fix: bundle modern ConPTY on Windows (#1828)
refs #1533
refs #1644
Diffstat (limited to 'scripts/test_vendor_portable_pty.py')
| -rw-r--r-- | scripts/test_vendor_portable_pty.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/test_vendor_portable_pty.py b/scripts/test_vendor_portable_pty.py index 87537d41..cf3b791a 100644 --- a/scripts/test_vendor_portable_pty.py +++ b/scripts/test_vendor_portable_pty.py @@ -103,13 +103,22 @@ class VendorPortablePtyTests(unittest.TestCase): f"stderr:\n{result.stderr}", ) - def test_windows_conpty_loader_does_not_probe_path_conpty_dll(self) -> None: + def test_windows_conpty_loader_uses_only_controlled_sources(self) -> None: project_root = Path(__file__).resolve().parent.parent source = project_root / "vendor" / "portable-pty" / "src" / "win" / "psuedocon.rs" text = source.read_text() - self.assertIn('ConPtyFuncs::open(Path::new("kernel32.dll"))', text) + self.assertIn("std::env::current_exe()", text) + self.assertIn('.join("conpty")', text) + self.assertIn('"x64/OpenConsole.exe"', text) + self.assertIn('"arm64/OpenConsole.exe"', text) + self.assertIn("LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR", text) + self.assertIn("LOAD_LIBRARY_SEARCH_SYSTEM32", text) + self.assertIn("GetModuleHandleW", text) + self.assertIn("HERDR_WINDOWS_CONPTY", text) + self.assertIn("Sha256::new()", text) self.assertNotIn('Path::new("conpty.dll")', text) + self.assertNotIn("shared_library", text) if __name__ == "__main__": |
