mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Test stale event paths with the standard backend (AI-assisted)
This commit is contained in:
parent
480277fc1f
commit
5e3963e1ee
1 changed files with 17 additions and 1 deletions
|
|
@ -415,7 +415,7 @@ fn compute_and_apply_changes(tree: &mut RojoTree, vfs: &Vfs, id: Ref) -> Option<
|
|||
mod test {
|
||||
use super::*;
|
||||
|
||||
use memofs::{InMemoryFs, VfsSnapshot};
|
||||
use memofs::{InMemoryFs, StdBackend, VfsSnapshot};
|
||||
|
||||
use crate::snapshot::InstanceSnapshot;
|
||||
|
||||
|
|
@ -448,4 +448,20 @@ mod test {
|
|||
|
||||
context.handle_vfs_event(VfsEvent::Write("/project/out/server/deep/file.luau".into()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stale_event_path_canonicalizes_with_std_backend() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let missing_suffix = Path::new("out/server/deep/file.luau");
|
||||
let missing_path = dir.path().join(missing_suffix);
|
||||
let expected_path = dunce::canonicalize(dir.path())
|
||||
.unwrap()
|
||||
.join(missing_suffix);
|
||||
let vfs = Vfs::new(StdBackend::new().unwrap());
|
||||
|
||||
assert_eq!(
|
||||
canonicalize_event_path(&vfs, &missing_path).unwrap(),
|
||||
expected_path
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue