File: test_pdf_create.rb

package info (click to toggle)
origami-pdf 2.1.0-1~exp2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,444 kB
  • sloc: ruby: 17,883; makefile: 8
file content (24 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'minitest/autorun'
require 'stringio'

class TestPDFCreate < Minitest::Test

    def setup
        @output = StringIO.new
    end

    def test_pdf_create
        pdf = PDF.new

        null = Null.new
        pdf << null

        pdf.save(@output)

        assert null.indirect?
        assert_equal null.reference.solve, null
        assert pdf.root_objects.include?(null)
        assert_equal pdf.revisions.first.body[null.reference], null
        assert_equal null.reference.solve, null
    end
end