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

Ian Beckwith ianb at erislabs.net
Fri Feb 18 22:01:46 UTC 2011


The following commit has been merged in the master branch:
commit 52b8d7d000b62da43948d1bd12caa6f72522f08a
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Fri Feb 18 21:58:32 2011 +0000

    Patch from Kyle Isom <coder at kyleisom.net> fixing many tests
    
    * ask:
        tested for at least five instances of the word foo (i.e. getting
        multiple results right and trying not to get tripped up by all the
        related search links).
    
    * austlii:
        site appears down, wasn't sure if it was a temporary or permanent thing.
        elvi untouched.
    
    * bbcnews:
        changed test to search for result count.
    
    * comlaw:
        changed search url to the current format, current test works.
    
    * discogs:
        discogs result format has changed; changed regex to match (and changed
        search artist to the artist that was playing at the time :))
    
    * port:
        the site used in the port no longer works. i am working on a replacement
        elvi, but that will take a bit longer to find a suitable site and suitable
        search method. This is in progress.
    
    * rpmsearch:
        The site structure has changed; I am in the process of adapting the elvi
        to work with the new site structure.
    
    * scroogle:
        test fixed. 'fast unix command line interface' doesn't show up in results,
        so search for link to surfraw homepage.
    
    * webster:
        the webster site is now a morass of writhing, congealed javascript; the
        test has been updated to a section free of javascript.

diff --git a/ChangeLog b/ChangeLog
index 32e85e7..0827df0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2011-02-09  Kyle Isom <coder at kyleisom.net>
+        * fix a number of tests to match current site formats
+
 2011-01-12  Kyle Isom  <coder at kyleisom.net>
 
 	* New elvi:
diff --git a/elvi/comlaw b/elvi/comlaw
index cbd347c..ad77032 100755
--- a/elvi/comlaw
+++ b/elvi/comlaw
@@ -19,5 +19,5 @@ if test -z "$w3_args"; then
     w3_browse_url "http://www.comlaw.gov.au/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://agsearch.ag.gov.au/clsearch/home?query=${escaped_args}"
+    w3_browse_url "http://www.comlaw.gov.au/Search/${escaped_args}"
 fi
diff --git a/elvi/port b/elvi/port
deleted file mode 100755
index 0206e36..0000000
--- a/elvi/port
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# $Id$
-# elvis: port		-- Look up a TCP/UDP port number on seifried.org/security/ports/
-. surfraw || exit 1
-
-w3_usage_hook () {
-    cat <<EOF
-Usage: $w3_argv0 [options] [portnumber]
-Description:
-  Look up a TCP/UDP port number at seifried.org/security/ports/
-EOF
-    w3_global_usage
-}
-
-w3_config
-w3_parse_args "$@"
-# w3_args now contains a list of arguments
-if test -z "$w3_args"; then
-    w3_browse_url "http://www.seifried.org/security/ports/"
-else
-    port=`w3_url_of_arg $w3_args`
-    if echo "$port"| egrep -q '^[0-9]{1,5}$' && expr "$port" \< 65536 >/dev/null ; then
-        if expr $port '<' 1000 > /dev/null; then
-	    path=0
-	else
-	    path="$( expr $port / 1000 )000"
-	fi
-	w3_browse_url "http://seifried.org/security/ports/$path/$port.html"
-    else
-	err "$port: not a port number"
-    fi
-fi
diff --git a/test/ask.test b/test/ask.test
index d95a552..e0df5d1 100644
--- a/test/ask.test
+++ b/test/ask.test
@@ -1,2 +1,2 @@
 ask foo
-Showing <span.*>1</span>-<span.*>10</span> of \d+
+(foo.+){5,}.+Next
diff --git a/test/bbcnews.test b/test/bbcnews.test
index 97477da..806fa20 100644
--- a/test/bbcnews.test
+++ b/test/bbcnews.test
@@ -1,2 +1,4 @@
 bbcnews minister
-<span class="number active">1</span>
+All Results <span>[(]\d+[)]
+
+
diff --git a/test/discogs.test b/test/discogs.test
index b975129..0c7aa15 100644
--- a/test/discogs.test
+++ b/test/discogs.test
@@ -1,2 +1,2 @@
-discogs swans
-\(showing 1 - 20 of \d+
+discogs radiohead
+\(\d+ results\)
diff --git a/test/scroogle.test b/test/scroogle.test
index 25d713e..4336526 100644
--- a/test/scroogle.test
+++ b/test/scroogle.test
@@ -1,6 +1,6 @@
 scroogle surfraw
-fast unix command line interface
+<a href="http://surfraw.alioth.debian.org/"><b>Surfraw</b>
 scroogle -nossl surfraw
-fast unix command line interface
+<a href="http://surfraw.alioth.debian.org/"><b>Surfraw</b>
 scroogle -lang=en surfraw
-fast unix command line interface
+<a href="http://surfraw.alioth.debian.org/"><b>Surfraw</b>
diff --git a/test/webster.test b/test/webster.test
index 4331599..34fe0b6 100644
--- a/test/webster.test
+++ b/test/webster.test
@@ -1,2 +1,2 @@
 webster quotidian
-cotidian
+<div class="example-sentences"><h2><span>Examples of <em>QUOTIDIAN</em></span>

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



More information about the Surfraw-commits mailing list