[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-95-g7c30b08

Ian Beckwith ianb at erislabs.net
Tue Mar 2 03:50:25 UTC 2010


The following commit has been merged in the master branch:
commit 2a8ff999e674ce889b48cf772f9b4b6112ad6e8c
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Tue Mar 2 01:50:55 2010 +0000

    * runtests: explicitly use elvi and config from source tree,
      now works when surfraw is not installed (but you need to have
      run make).

diff --git a/ChangeLog b/ChangeLog
index fcfa451..fe9caab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,13 @@
 	* W, yahoo: fix tests.
 	* Update AUTHORS.
 	* Add a note to appendix 1 of HACKING about updating AUTHORS.
+	* runtests: explicitly use elvi and config from source tree,
+	  now works when surfraw is not installed (but you need to have
+	  run make).
 	* test/Makefile.am: fix bookfinder typo, add bing.test.
+	* remove leading 'sr ' from command lines for following tests:
+	    acronym aur bing cliki gcache genportage google javasun l1sp
+	    lsm mathworld mininova piratebay youtube
 
 2010-02-22  Ivy Foster  <joyfulgirl at archlinux.us>
 
diff --git a/elvi/bing b/elvi/bing
old mode 100644
new mode 100755
diff --git a/test/acronym.test b/test/acronym.test
index f1f5370..dde1960 100644
--- a/test/acronym.test
+++ b/test/acronym.test
@@ -1,10 +1,10 @@
-sr acronym -e NASA
+acronym -e NASA
 National Aeronautics and Space Administration \(USA\)
-sr acronym -u NASA
+acronym -u NASA
 National Association for the Advancement
-sr acronym surfraw
+acronym surfraw
 What does SURFRAW stand for\?
-sr acronym -f
+acronym -f
 Systematic Buzz Phrase Projector \(SBPP\) number
-sr acronym -a aaa
+acronym -a aaa
 Academia de Automovilismo Andrade \(Guatemala\)
diff --git a/test/aur.test b/test/aur.test
index 217b022..8a10c02 100644
--- a/test/aur.test
+++ b/test/aur.test
@@ -1,2 +1,2 @@
-sr aur mawk
+aur mawk
 AWK Programming Language
diff --git a/test/bing.test b/test/bing.test
index 019eebd..88b9e15 100644
--- a/test/bing.test
+++ b/test/bing.test
@@ -1,2 +1,2 @@
-sr bing surfraw
+bing surfraw
 a fast unix command line
diff --git a/test/cliki.test b/test/cliki.test
index 20147df..5e3ed65 100644
--- a/test/cliki.test
+++ b/test/cliki.test
@@ -1,2 +1,2 @@
-sr cliki sbcl
+cliki sbcl
 \d+ results found, showing results \d+
diff --git a/test/gcache.test b/test/gcache.test
index d231811..8b8dd75 100644
--- a/test/gcache.test
+++ b/test/gcache.test
@@ -1,4 +1,4 @@
-sr gcache www.mozilla.org
+gcache www.mozilla.org
 http://www.google.com/intl/[A-Za-z]+/help/features_list.html#cached
-sr gcache -i www.openoffice.org
+gcache -i www.openoffice.org
 cache:www.openoffice.org&amp;hl=.*&strip=1
diff --git a/test/genportage.test b/test/genportage.test
index 933d2d7..f4f3e3e 100644
--- a/test/genportage.test
+++ b/test/genportage.test
@@ -1,2 +1,2 @@
-sr genportage surfraw
+genportage surfraw
 www-client/surfraw
diff --git a/test/google.test b/test/google.test
index 4eb1848..f1ea34c 100644
--- a/test/google.test
+++ b/test/google.test
@@ -1,2 +1,2 @@
-sr google foo
+google foo
 Results .* of about .* for
diff --git a/test/javasun.test b/test/javasun.test
index 46bddd7..43e84e4 100644
--- a/test/javasun.test
+++ b/test/javasun.test
@@ -1,2 +1,2 @@
-sr javasun stream
+javasun stream
 StreamFilter
diff --git a/test/l1sp.test b/test/l1sp.test
index 38f263e..87e3943 100644
--- a/test/l1sp.test
+++ b/test/l1sp.test
@@ -1,2 +1,2 @@
-sr l1sp defun
+l1sp defun
 Results for 
diff --git a/test/lsm.test b/test/lsm.test
index ad6fdf3..62d770b 100644
--- a/test/lsm.test
+++ b/test/lsm.test
@@ -1,2 +1,2 @@
-sr lsm surfraw
+lsm surfraw
 lsmbyid\.cgi.*surfraw
diff --git a/test/mathworld.test b/test/mathworld.test
index 679d816..d7789e5 100644
--- a/test/mathworld.test
+++ b/test/mathworld.test
@@ -1,2 +1,2 @@
-sr mathworld matrix
+mathworld matrix
 Search Results
diff --git a/test/mininova.test b/test/mininova.test
index 92fbdf0..25f21bf 100644
--- a/test/mininova.test
+++ b/test/mininova.test
@@ -1,2 +1,2 @@
-sr mininova simpsons
+mininova simpsons
 Search results for simpsons
diff --git a/test/piratebay.test b/test/piratebay.test
index fea0c41..1be0999 100644
--- a/test/piratebay.test
+++ b/test/piratebay.test
@@ -1,2 +1,2 @@
-sr piratebay simpsons
+piratebay simpsons
 impsons.*S\d+E\d+
diff --git a/test/runtests b/test/runtests
index 78c74b4..e8e14ef 100755
--- a/test/runtests
+++ b/test/runtests
@@ -4,6 +4,7 @@
 #
 
 eval "require LWP::UserAgent" or die("runtests: libwww-perl not found, aborting tests.\n");
+use Cwd;
 use strict;
 use vars qw($me);
 $me=($0=~/(?:.*\/)?(.*)/)[0];
@@ -11,11 +12,14 @@ $me=($0=~/(?:.*\/)?(.*)/)[0];
 our($OK,$FAIL,$SKIP)=(0,1,2);
 our $ua;
 
+my $scriptpath=Cwd::abs_path($0);
+# drop scriptname and last path component to get srcdir
+my $srcdir= ($scriptpath=~/(.*)\/.*\/.*/)[0];
 my @testfiles;
 if(@ARGV) {
     @testfiles=@ARGV;
 } else {
-    @testfiles=<*.test>;
+    @testfiles=<$srcdir/test/*.test>;
 }
 
 die("No tests found\n") unless(@testfiles);
@@ -34,7 +38,7 @@ $longestname -= length ".test";
 
 for my $testfile (@testfiles)
 {
-    my ($elvi)=($testfile=~/(.*)\.test/);
+    my ($elvi)=($testfile=~/(?:.*\/)?(.*)\.test/);
     unless(defined($elvi)) { $elvi=$testfile; }
     print $elvi;
     my $space=($longestname+1)-(length $elvi);
@@ -136,7 +140,7 @@ sub testelvis
 	my $hash=$tests[$count];
 	my $cmd  =(keys  (%$hash))[0];
 	my $match=(values(%$hash))[0];
-	unless(open(ELVI,"SURFRAW_lang= SURFRAW_browser=echo PATH=\"../elvi:..:\$PATH\"  $cmd|"))
+	unless(open(ELVI,"SURFRAW_lang= SURFRAW_browser=echo SURFRAW_global_conf=\"$srcdir/surfraw.conf\" PATH=\"$srcdir/elvi:$srcdir:\$PATH\" $srcdir/elvi/$cmd|"))
 	{
 	    print "FAIL: cannot execute \"$cmd\": $!";
 	    push(@results,$FAIL);
diff --git a/test/youtube.test b/test/youtube.test
index 57ce8a5..3ee0bbb 100644
--- a/test/youtube.test
+++ b/test/youtube.test
@@ -1,2 +1,2 @@
-sr youtube simpsons
+youtube simpsons
 Simpsons

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list