1#!./perl -w
2
3BEGIN {
4    chdir 't' if -d 't';
5    require './test.pl';
6    set_up_inc('../lib');
7    skip_all_without_config('d_setpgrp');
8}
9
10plan tests => 3;
11
12ok(!eval { package A;sub foo { die("got here") }; package main; A->foo(setpgrp())});
13ok($@ =~ /got here/, "setpgrp() should extend the stack before modifying it");
14
15is join("_", setpgrp(0)), 1, 'setpgrp with one argument';
16