summaryrefslogtreecommitdiff
path: root/tests/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/tests.rs')
-rw-r--r--tests/src/tests.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/src/tests.rs b/tests/src/tests.rs
index f295869f..c2d0cc68 100644
--- a/tests/src/tests.rs
+++ b/tests/src/tests.rs
@@ -22,7 +22,7 @@ use walkdir::WalkDir;
use typst::diag::{bail, FileError, FileResult};
use typst::doc::{Document, Frame, FrameItem, Meta};
-use typst::eval::{func, Library, Value};
+use typst::eval::{func, Datetime, Library, Value};
use typst::font::{Font, FontBook};
use typst::geom::{Abs, Color, RgbaColor, Sides, Smart};
use typst::syntax::{Source, SourceId, Span, SyntaxNode};
@@ -296,6 +296,10 @@ impl World for TestWorld {
.get_or_init(|| read(path).map(Buffer::from))
.clone()
}
+
+ fn today(&self, _: Option<i64>) -> Option<Datetime> {
+ Some(Datetime::from_ymd(1970, 1, 1).unwrap())
+ }
}
impl TestWorld {