[Libsysio-commit] HEAD: libsysio/tests cleanup.pl setup.pl test_all.pl test_copy.pl test_getcwd.pl t
Brought to you by:
lward
|
From: Sonja T. <so...@us...> - 2004-01-21 15:14:02
|
Update of /cvsroot/libsysio/libsysio/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv30611/tests
Modified Files:
cleanup.pl setup.pl test_all.pl test_copy.pl test_getcwd.pl
test_list.pl test_path.pl test_stats.pl test_symlink.pl
Log Message:
Fixing bugs in perl test scripts.
Index: cleanup.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/cleanup.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -b -B -p -r1.1 -r1.2
--- cleanup.pl 30 Oct 2003 15:22:19 -0000 1.1
+++ cleanup.pl 21 Jan 2004 15:13:56 -0000 1.2
@@ -46,8 +46,7 @@ if ((@ARGV > 1) && ($ARGV[$currarg++] eq
my $cwd = $ARGV[$currarg];
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
Index: setup.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/setup.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -b -B -p -r1.1 -r1.2
--- setup.pl 30 Oct 2003 15:22:19 -0000 1.1
+++ setup.pl 21 Jan 2004 15:13:56 -0000 1.2
@@ -40,8 +40,7 @@ if ((@ARGV > 1) && ($ARGV[$currarg++] eq
my $cwd = $ARGV[$currarg];
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
Index: test_all.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_all.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -b -B -p -r1.6 -r1.7
--- test_all.pl 30 Oct 2003 15:22:19 -0000 1.6
+++ test_all.pl 21 Jan 2004 15:13:56 -0000 1.7
@@ -6,6 +6,8 @@
#
use strict;
+use FindBin;
+
use Cwd 'abs_path';
my $alpha_arg = "";
@@ -31,8 +33,7 @@ my $success = 0;
my $cwd = $ENV{PWD};
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+my $testdir = $FindBin::Bin;
my $res;
Index: test_copy.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_copy.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- test_copy.pl 10 Oct 2003 18:50:31 -0000 1.3
+++ test_copy.pl 21 Jan 2004 15:13:56 -0000 1.4
@@ -23,8 +23,7 @@ sub process_cmd
my ($src, $dest, $is_alpha) = @_;
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
Index: test_getcwd.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_getcwd.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -b -B -p -r1.4 -r1.5
--- test_getcwd.pl 30 Oct 2003 15:22:19 -0000 1.4
+++ test_getcwd.pl 21 Jan 2004 15:13:56 -0000 1.5
@@ -46,8 +46,7 @@ sub process_cmd
my ($dir, $is_alpha) = @_;
# Get tests directory
- my $testdir = $0;
- $testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
Index: test_list.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_list.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- test_list.pl 10 Oct 2003 18:50:31 -0000 1.3
+++ test_list.pl 21 Jan 2004 15:13:56 -0000 1.4
@@ -129,8 +129,7 @@ sub process_cmd
my $done_files = 0;
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 1) {
Index: test_path.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_path.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- test_path.pl 10 Oct 2003 18:50:31 -0000 1.3
+++ test_path.pl 21 Jan 2004 15:13:56 -0000 1.4
@@ -87,8 +87,7 @@ sub process_cmd
my $path;
# Get tests directory
- my $testdir = $0;
- $testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($isalpha == 0) {
Index: test_stats.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_stats.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -b -B -p -r1.5 -r1.6
--- test_stats.pl 30 Oct 2003 15:22:19 -0000 1.5
+++ test_stats.pl 21 Jan 2004 15:13:56 -0000 1.6
@@ -95,8 +95,7 @@ sub process_cmd
my ($file, $use_system, $is_alpha) = @_;
# Get tests directory
-my $testdir = $0;
-$testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
Index: test_symlink.pl
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/test_symlink.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -b -B -p -r1.3 -r1.4
--- test_symlink.pl 30 Oct 2003 15:22:19 -0000 1.3
+++ test_symlink.pl 21 Jan 2004 15:13:56 -0000 1.4
@@ -58,8 +58,7 @@ sub process_cmd
my ($src, $dest, $is_alpha) = @_;
# Get tests directory
- my $testdir = $0;
- $testdir =~ s/\/\w+.pl$//;
+ my $testdir = $FindBin::Bin;
eval {
if ($is_alpha == 0) {
|