]> git.donarmstrong.com Git - debhelper.git/blob - t/maintscript
Updated French man page translation. Closes: #685560
[debhelper.git] / t / maintscript
1 #!/usr/bin/perl
2 use Test;
3 plan(tests => 8);
4
5 system("mkdir -p t/tmp/debian");
6 system("cp debian/control t/tmp/debian");
7 open(OUT, ">", "t/tmp/debian/maintscript") || die "$!";
8 print OUT <<EOF;
9 rm_conffile /etc/1
10 mv_conffile /etc/2 /etc/3 1.0-1
11 EOF
12 close OUT;
13 system("cd t/tmp && DH_COMPAT=7 fakeroot ../../dh_installdeb");
14 for my $script (qw{postinst preinst prerm postrm}) {
15         my @output=`cat t/tmp/debian/debhelper.$script.debhelper`;
16         ok(grep { m{^dpkg-maintscript-helper rm_conffile /etc/1 -- "\$\@"$} } @output);
17         ok(grep { m{^dpkg-maintscript-helper mv_conffile /etc/2 /etc/3 1\.0-1 -- "\$\@"$} } @output);
18 }
19 system("rm -rf t/tmp");