BS2000-LMS

 view release on metacpan or  search on metacpan

t/LMS.t  view on Meta::CPAN

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# 22..26: extract
 
use constant TESTFILE => 'CSTDARG';
 
$tempfile = '/tmp/LMS.t.'.$$;
$count_out = $library->extract($tempfile, type => 'S', name => TESTFILE);
is($library->{return_code}, LMSUP_OK, 'returncode (extract)');
is($library->message(), '', 'diagnostics (extract)');
ok(50 < $count_out && -s $tempfile, 'something written (extract)');
is((stat(_))[7], $count_out, 'correct size (extract, '.$count_out.')');
ok(0 == system('diff /usr/include/'.lc(TESTFILE).' '.$tempfile.' >/dev/null'),
   'correct content (extract)');
 
# 27..33: add
$templib = 'LMS.T.TESTLIB.'.$$;
$test_lib = new BS2000::LMS $templib;
ok(defined $test_lib, 'TESTLIB created');
is($test_lib->{return_code}, LMSUP_OK, 'returncode (new)');
is($test_lib->message(), '', 'diagnostics (new)');
$count_in = $test_lib->add($tempfile, type => 'S', name => TESTFILE);



( run in 0.530 second using v1.01-cache-2.11-cpan-1f129e94a17 )