diff options
author | Jay Berkenbilt <ejb@ql.org> | 2008-04-29 14:55:25 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2008-04-29 14:55:25 +0200 |
commit | 9a0b88bf7777c153dc46ace22db74ef24d51583a (patch) | |
tree | f567ac1cf2bf5071a611eb49323a935b6ac938ff /libtests/qtest/qexc.test | |
download | qpdf-9a0b88bf7777c153dc46ace22db74ef24d51583a.tar.zst |
update release date to actual daterelease-qpdf-2.0
git-svn-id: svn+q:///qpdf/trunk@599 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libtests/qtest/qexc.test')
-rw-r--r-- | libtests/qtest/qexc.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libtests/qtest/qexc.test b/libtests/qtest/qexc.test new file mode 100644 index 00000000..b8632b9b --- /dev/null +++ b/libtests/qtest/qexc.test @@ -0,0 +1,32 @@ +#!/usr/bin/env perl + +require 5.008; +BEGIN { $^W = 1; } +use strict; + +chdir("qexc") or die "chdir qexc failed: $!\n"; + +require TestDriver; + +my $td = new TestDriver('qexc'); + +my @tests = + (['general exception', 2], + ['internal error', 3], + ['system exception', 2], + ['library exception', 3, "uncaught exception: .+\n"], # fails on VC7? + ); + +for (my $i = 0; $i < scalar(@tests); ++$i) +{ + my $output = +((-f "test$i.out") + ? {$td->FILE => "test$i.out"} + : {$td->REGEXP => $tests[$i]->[2]}); + $output->{$td->EXIT_STATUS} = $tests[$i]->[1]; + $td->runtest($tests[$i]->[0], + {$td->COMMAND => "qexc $i"}, + $output, + $td->NORMALIZE_NEWLINES); +} + +$td->report(scalar(@tests)); |