()
| 746 | |
| 747 | #[test] |
| 748 | fn test_dir_other_by_cwd() { |
| 749 | let mut other = InMemoryDrive::default(); |
| 750 | block_on(other.put("foo.bas", b"hello")).unwrap(); |
| 751 | |
| 752 | let mut t = Tester::default().write_file("empty.bas", ""); |
| 753 | t.get_storage().borrow_mut().attach("other", "z://", Box::from(other)).unwrap(); |
| 754 | |
| 755 | let mut prints = vec![ |
| 756 | "", |
| 757 | " Directory of MEMORY:/", |
| 758 | "", |
| 759 | " Modified Size Name", |
| 760 | " 2020-05-06 09:37 0 empty.bas", |
| 761 | "", |
| 762 | " 1 file(s), 0 bytes", |
| 763 | "", |
| 764 | ]; |
| 765 | t.run("DIR") |
| 766 | .expect_prints(prints.clone()) |
| 767 | .expect_file("MEMORY:/empty.bas", "") |
| 768 | .expect_file("OTHER:/foo.bas", "hello") |
| 769 | .check(); |
| 770 | |
| 771 | t.get_storage().borrow_mut().cd("other:/").unwrap(); |
| 772 | prints.extend([ |
| 773 | "", |
| 774 | " Directory of OTHER:/", |
| 775 | "", |
| 776 | " Modified Size Name", |
| 777 | " 2020-05-06 09:37 5 foo.bas", |
| 778 | "", |
| 779 | " 1 file(s), 5 bytes", |
| 780 | "", |
| 781 | ]); |
| 782 | t.run("DIR") |
| 783 | .expect_prints(prints) |
| 784 | .expect_file("MEMORY:/empty.bas", "") |
| 785 | .expect_file("OTHER:/foo.bas", "hello") |
| 786 | .check(); |
| 787 | } |
| 788 | |
| 789 | #[test] |
| 790 | fn test_dir_narrow_empty() { |
nothing calls this directly
no test coverage detected