X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=t%2FZOOM-IRSpy.t;h=e9bd6123b1da657598a50ac8c7595274a37152b5;hp=b60bbe01d453f24a621cf6654e823545e964c768;hb=d3725cdc5d765df0eff9c525c6e3de015c8ca47c;hpb=69b5f15509990c5c17b18d875be51db48b6efea3 diff --git a/t/ZOOM-IRSpy.t b/t/ZOOM-IRSpy.t index b60bbe0..e9bd612 100644 --- a/t/ZOOM-IRSpy.t +++ b/t/ZOOM-IRSpy.t @@ -1,9 +1,38 @@ -# $Id: ZOOM-IRSpy.t,v 1.1 2007-04-18 11:23:01 mike Exp $ - # change 'tests => 1' to 'tests => last_test_to_print'; -use Test::More tests => 1; -BEGIN { use_ok('ZOOM::IRSpy') }; + +use Test::More qw(no_plan); + +BEGIN { + use_ok('ZOOM::IRSpy'); +} # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. +use strict; +use warnings; + +my $irspy_to_zeerex_xsl = 'xsl/irspy2zeerex.xsl'; + +$ZOOM::IRSpy::irspy_to_zeerex_xsl = $irspy_to_zeerex_xsl + if $irspy_to_zeerex_xsl; + +my $dbname = 'localhost:8018/IR-Explain---1'; +my $spy = new ZOOM::IRSpy( $dbname, "admin", "fruitbat" ); + +isa_ok( $spy, 'ZOOM::IRSpy' ); + +# test for failure if template not exists +eval { + $ZOOM::IRSpy::irspy_to_zeerex_xsl = '/nonexist'; + $ZOOM::IRSpy::debug = 1; + $ZOOM::IRSpy::xslt_max_depth = 100; + $spy = new ZOOM::IRSpy( $dbname, "admin", "fruitbat" ); +}; + +like( $@, qr/No such file or directory/, "xslt configure test" ); + +1; + +__DATA__; +foo