summaryrefslogtreecommitdiff
path: root/t/info.t
diff options
context:
space:
mode:
Diffstat (limited to 't/info.t')
-rw-r--r--t/info.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/info.t b/t/info.t
index 2c1ca51..5783c79 100644
--- a/t/info.t
+++ b/t/info.t
@@ -8,23 +8,36 @@ use PDF::Builder;
my $pdf = PDF::Builder->new();
+# 1
like($pdf->producer(), qr/PDF::Builder/,
q{Producer is set on PDF creation});
$pdf->producer('Test');
+# 2
is($pdf->producer(), 'Test',
q{Producer can be changed});
+# 3
$pdf->producer(undef);
ok(!$pdf->producer(),
q{Producer can be cleared});
+# 4
$pdf->created('D:20000101000000Z');
like($pdf->to_string(),
qr{/CreationDate \(D:20000101000000Z\)},
q{CreationDate is correctly encoded});
+# 5
+$pdf = PDF::Builder->new(); # not sure why have to get a fresh PDF object...
+ # did some test upstream corrupt it?
+$pdf->modified("D:20230402144932-04'00");
+
+like($pdf->to_string(),
+ qr{/ModDate \(D:20230402144932-04'00\)},
+ q{ModDate is correctly encoded});
+
done_testing();