remove treehouse-format crate and collapse everything into src
This commit is contained in:
parent
ca127a9411
commit
b792688776
66 changed files with 145 additions and 112 deletions
22
tests/it/vfs/file.rs
Normal file
22
tests/it/vfs/file.rs
Normal file
|
@ -0,0 +1,22 @@
|
|||
use treehouse::vfs::{entries, query, BufferedFile, Content, VPath};
|
||||
|
||||
fn vfs() -> BufferedFile {
|
||||
BufferedFile::new(Content::new("text/plain", b"hewwo :3".to_vec()))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dir() {
|
||||
let vfs = vfs();
|
||||
assert!(entries(&vfs, VPath::ROOT).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn content() {
|
||||
let vfs = vfs();
|
||||
assert_eq!(
|
||||
query::<Content>(&vfs, VPath::ROOT)
|
||||
.map(|c| c.bytes())
|
||||
.as_deref(),
|
||||
Some(b"hewwo :3".as_slice()),
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue