()
| 705 | |
| 706 | #[test] |
| 707 | fn test_dir_other_by_argument() { |
| 708 | let mut other = InMemoryDrive::default(); |
| 709 | block_on(other.put("foo.bas", b"hello")).unwrap(); |
| 710 | |
| 711 | let mut t = Tester::default().write_file("empty.bas", ""); |
| 712 | t.get_storage().borrow_mut().attach("other", "z://", Box::from(other)).unwrap(); |
| 713 | |
| 714 | let mut prints = vec![ |
| 715 | "", |
| 716 | " Directory of MEMORY:/", |
| 717 | "", |
| 718 | " Modified Size Name", |
| 719 | " 2020-05-06 09:37 0 empty.bas", |
| 720 | "", |
| 721 | " 1 file(s), 0 bytes", |
| 722 | "", |
| 723 | ]; |
| 724 | t.run("DIR \"memory:\"") |
| 725 | .expect_prints(prints.clone()) |
| 726 | .expect_file("MEMORY:/empty.bas", "") |
| 727 | .expect_file("OTHER:/foo.bas", "hello") |
| 728 | .check(); |
| 729 | |
| 730 | prints.extend([ |
| 731 | "", |
| 732 | " Directory of OTHER:/", |
| 733 | "", |
| 734 | " Modified Size Name", |
| 735 | " 2020-05-06 09:37 5 foo.bas", |
| 736 | "", |
| 737 | " 1 file(s), 5 bytes", |
| 738 | "", |
| 739 | ]); |
| 740 | t.run("DIR \"other:/\"") |
| 741 | .expect_prints(prints) |
| 742 | .expect_file("MEMORY:/empty.bas", "") |
| 743 | .expect_file("OTHER:/foo.bas", "hello") |
| 744 | .check(); |
| 745 | } |
| 746 | |
| 747 | #[test] |
| 748 | fn test_dir_other_by_cwd() { |
nothing calls this directly
no test coverage detected