1*0Sstevel@tonic-gate#!./perl 2*0Sstevel@tonic-gate 3*0Sstevel@tonic-gateBEGIN { 4*0Sstevel@tonic-gate # Can't chdir in BEGIN before FindBin runs, as it then can't find us. 5*0Sstevel@tonic-gate @INC = -d 't' ? 'lib' : '../lib'; 6*0Sstevel@tonic-gate} 7*0Sstevel@tonic-gate 8*0Sstevel@tonic-gateprint "1..2\n"; 9*0Sstevel@tonic-gate 10*0Sstevel@tonic-gateuse FindBin qw($Bin); 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gateprint "# $Bin\n"; 13*0Sstevel@tonic-gate 14*0Sstevel@tonic-gateif ($^O eq 'MacOS') { 15*0Sstevel@tonic-gate print "not " unless $Bin =~ m,:lib:$,; 16*0Sstevel@tonic-gate} else { 17*0Sstevel@tonic-gate print "not " unless $Bin =~ m,[/.]lib\]?$,; 18*0Sstevel@tonic-gate} 19*0Sstevel@tonic-gateprint "ok 1\n"; 20*0Sstevel@tonic-gate 21*0Sstevel@tonic-gate$0 = "-"; 22*0Sstevel@tonic-gateFindBin::again(); 23*0Sstevel@tonic-gate 24*0Sstevel@tonic-gateprint "not " if $FindBin::Script ne "-"; 25*0Sstevel@tonic-gateprint "ok 2\n"; 26