#!/usr/bin/env perl
require 5.008;
use warnings;
use strict;

unshift(@INC, '.');
require qpdf_test_helpers;

chdir("qpdf") or die "chdir testdir failed: $!\n";

require TestDriver;

cleanup();

my $td = new TestDriver('stream-line-terminators');

my $n_tests = 2;

$td->runtest("odd terminators for stream keyword",
             {$td->COMMAND =>
                  "qpdf --qdf --static-id" .
                  " stream-line-enders.pdf a.qdf"},
             {$td->FILE => "stream-line-enders.out",
              $td->EXIT_STATUS => 3},
             $td->NORMALIZE_NEWLINES);
$td->runtest("check output",
             {$td->FILE => "a.qdf"},
             {$td->FILE => "stream-line-enders.qdf"});

cleanup();
$td->report($n_tests);
