2 package Debian::Debhelper::Dh_Lib::Test;
9 use_ok('Debian::Debhelper::Dh_Lib');
11 sub ok_autoscript_result {
12 ok(-f 'debian/testpackage.postinst.debhelper');
13 open(F, 'debian/testpackage.postinst.debhelper') or die;
16 like(join('',@c), qr{update-rc\.d test-script test parms with"quote >/dev/null});
19 ok(unlink('debian/testpackage.postinst.debhelper') >= 0);
21 ok(autoscript('testpackage', 'postinst', 'postinst-init',
22 's/#SCRIPT#/test-script/g; s/#INITPARMS#/test parms with\\"quote/g'));
25 ok(unlink('debian/testpackage.postinst.debhelper') >= 0);
27 ok(autoscript('testpackage', 'postinst', 'postinst-init',
28 sub { s/#SCRIPT#/test-script/g; s/#INITPARMS#/test parms with"quote/g } ));
31 ok(unlink('debian/testpackage.postinst.debhelper') >= 0);