| 445 | |
| 446 | #[wasm_bindgen_test] |
| 447 | async fn test_webdrive_get() { |
| 448 | let entry = Entry { |
| 449 | version: Entry::VERSION, |
| 450 | content: b"second".to_vec(), |
| 451 | mtime: OffsetDateTime::from_unix_timestamp(1234).unwrap(), |
| 452 | }; |
| 453 | |
| 454 | let webdrive = WebDrive::from_window(); |
| 455 | webdrive.storage.clear().unwrap(); |
| 456 | webdrive.storage.set("endbasic-program:A.BAS", "first").unwrap(); |
| 457 | webdrive |
| 458 | .storage |
| 459 | .set("endbasic-program:B.BAS", &serde_json::to_string(&entry).unwrap()) |
| 460 | .unwrap(); |
| 461 | webdrive.storage.set("endbasic-program:B.BAT", "third").unwrap(); |
| 462 | webdrive.storage.set("B.BAS", "fourth").unwrap(); |
| 463 | |
| 464 | assert_eq!(entry.content, webdrive.get("B.BAS").await.unwrap()); |
| 465 | } |
| 466 | |
| 467 | #[wasm_bindgen_test] |
| 468 | async fn test_webdrive_put() { |