Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions crates/bashkit/tests/integration/python_integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,23 @@ mod vfs_bridging {
assert_eq!(r.stdout, "via path");
}

#[tokio::test]
async fn bash_path_open_and_open_share_same_vfs_path() {
let mut bash = bash_python();
let r = bash
.exec(
"printf 'bash-1\\n' > /tmp/shared-open.txt\n\
python3 -c \"from pathlib import Path\nwith Path('/tmp/shared-open.txt').open('a') as f:\n f.write('path-open\\n')\"\n\
python3 -c \"with open('/tmp/shared-open.txt', 'a') as f:\n f.write('open\\n')\"\n\
printf 'bash-2\\n' >> /tmp/shared-open.txt\n\
cat /tmp/shared-open.txt",
)
.await
.unwrap();
assert_eq!(r.exit_code, 0);
assert_eq!(r.stdout, "bash-1\npath-open\nopen\nbash-2\n");
}

#[tokio::test]
async fn open_append_text_preserves_existing_content() {
let mut bash = bash_python();
Expand Down
Loading