Share scanned source storage across native publications
This commit is contained in:
1 parent
c09d545da6
commit
d6ab5a025f
6 files changed
+46
-10
No files matched your search
@@ -1754,6 +1754,17 @@ fn generated_input_change_uses_a_checkpoint_before_the_read() {
|
||||
assert_eq!(updated.source_map.sources, full.source_map.sources);
|
||||
assert_eq!(updated.source_map.pages, full.source_map.pages);
|
||||
assert!(updated.execution.execution == full.execution.execution);
|
||||
let aux_source = |result: &CompiledDocument| {
|
||||
let (id, source) = result.execution.execution.sources.iter().enumerate()
|
||||
.find(|(_, source)| Path::new(&source.name) == aux).unwrap();
|
||||
(source.clone(), result.execution.source_versions[id].clone())
|
||||
};
|
||||
let (old_source, old_version) = aux_source(&original);
|
||||
let (current_source, current_version) = aux_source(&updated);
|
||||
assert!(!Arc::ptr_eq(&old_source, ¤t_source));
|
||||
assert_eq!(old_source.data, b"\\def\\widthfromaux{11}\n");
|
||||
assert_eq!(current_source.data, b"\\def\\widthfromaux{22}\n");
|
||||
assert_ne!(old_version, current_version);
|
||||
assert_eq!(fs::read(&aux).unwrap(), b"\\def\\widthfromaux{22}\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user