BS2000-LMS
view release on metacpan or search on metacpan
# 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 1.067 second using v1.01-cache-2.11-cpan-49f99fa48dc )